
// Generated from D:/antlr/src/main/resources\pascal.g4 by ANTLR 4.9.2


#include "pascalListener.h"
#include "pascalVisitor.h"

#include "pascalParser.h"


using namespace antlrcpp;
using namespace pascal;
using namespace antlr4;

pascalParser::pascalParser(TokenStream *input) : Parser(input) {
  _interpreter = new atn::ParserATNSimulator(this, _atn, _decisionToDFA, _sharedContextCache);
}

pascalParser::~pascalParser() {
  delete _interpreter;
}

std::string pascalParser::getGrammarFileName() const {
  return "pascal.g4";
}

const std::vector<std::string>& pascalParser::getRuleNames() const {
  return _ruleNames;
}

dfa::Vocabulary& pascalParser::getVocabulary() const {
  return _vocabulary;
}


//----------------- ProgramContext ------------------------------------------------------------------

pascalParser::ProgramContext::ProgramContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::ProgramHeadingContext* pascalParser::ProgramContext::programHeading() {
  return getRuleContext<pascalParser::ProgramHeadingContext>(0);
}

pascalParser::BlockContext* pascalParser::ProgramContext::block() {
  return getRuleContext<pascalParser::BlockContext>(0);
}

tree::TerminalNode* pascalParser::ProgramContext::DOT() {
  return getToken(pascalParser::DOT, 0);
}

tree::TerminalNode* pascalParser::ProgramContext::INTERFACE() {
  return getToken(pascalParser::INTERFACE, 0);
}


size_t pascalParser::ProgramContext::getRuleIndex() const {
  return pascalParser::RuleProgram;
}

void pascalParser::ProgramContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProgram(this);
}

void pascalParser::ProgramContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProgram(this);
}


antlrcpp::Any pascalParser::ProgramContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitProgram(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ProgramContext* pascalParser::program() {
  ProgramContext *_localctx = _tracker.createInstance<ProgramContext>(_ctx, getState());
  enterRule(_localctx, 0, pascalParser::RuleProgram);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(194);
    programHeading();
    setState(196);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == pascalParser::INTERFACE) {
      setState(195);
      match(pascalParser::INTERFACE);
    }
    setState(198);
    block();
    setState(199);
    match(pascalParser::DOT);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ProgramHeadingContext ------------------------------------------------------------------

pascalParser::ProgramHeadingContext::ProgramHeadingContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::ProgramHeadingContext::PROGRAM() {
  return getToken(pascalParser::PROGRAM, 0);
}

pascalParser::IdentifierContext* pascalParser::ProgramHeadingContext::identifier() {
  return getRuleContext<pascalParser::IdentifierContext>(0);
}

tree::TerminalNode* pascalParser::ProgramHeadingContext::SEMI() {
  return getToken(pascalParser::SEMI, 0);
}

tree::TerminalNode* pascalParser::ProgramHeadingContext::LPAREN() {
  return getToken(pascalParser::LPAREN, 0);
}

pascalParser::IdentifierListContext* pascalParser::ProgramHeadingContext::identifierList() {
  return getRuleContext<pascalParser::IdentifierListContext>(0);
}

tree::TerminalNode* pascalParser::ProgramHeadingContext::RPAREN() {
  return getToken(pascalParser::RPAREN, 0);
}

tree::TerminalNode* pascalParser::ProgramHeadingContext::UNIT() {
  return getToken(pascalParser::UNIT, 0);
}


size_t pascalParser::ProgramHeadingContext::getRuleIndex() const {
  return pascalParser::RuleProgramHeading;
}

void pascalParser::ProgramHeadingContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProgramHeading(this);
}

void pascalParser::ProgramHeadingContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProgramHeading(this);
}


antlrcpp::Any pascalParser::ProgramHeadingContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitProgramHeading(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ProgramHeadingContext* pascalParser::programHeading() {
  ProgramHeadingContext *_localctx = _tracker.createInstance<ProgramHeadingContext>(_ctx, getState());
  enterRule(_localctx, 2, pascalParser::RuleProgramHeading);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(215);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::PROGRAM: {
        enterOuterAlt(_localctx, 1);
        setState(201);
        match(pascalParser::PROGRAM);
        setState(202);
        identifier();
        setState(207);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if (_la == pascalParser::LPAREN) {
          setState(203);
          match(pascalParser::LPAREN);
          setState(204);
          identifierList();
          setState(205);
          match(pascalParser::RPAREN);
        }
        setState(209);
        match(pascalParser::SEMI);
        break;
      }

      case pascalParser::UNIT: {
        enterOuterAlt(_localctx, 2);
        setState(211);
        match(pascalParser::UNIT);
        setState(212);
        identifier();
        setState(213);
        match(pascalParser::SEMI);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- IdentifierContext ------------------------------------------------------------------

pascalParser::IdentifierContext::IdentifierContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::IdentifierContext::IDENT() {
  return getToken(pascalParser::IDENT, 0);
}


size_t pascalParser::IdentifierContext::getRuleIndex() const {
  return pascalParser::RuleIdentifier;
}

void pascalParser::IdentifierContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterIdentifier(this);
}

void pascalParser::IdentifierContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitIdentifier(this);
}


antlrcpp::Any pascalParser::IdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitIdentifier(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::IdentifierContext* pascalParser::identifier() {
  IdentifierContext *_localctx = _tracker.createInstance<IdentifierContext>(_ctx, getState());
  enterRule(_localctx, 4, pascalParser::RuleIdentifier);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(217);
    match(pascalParser::IDENT);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- BlockContext ------------------------------------------------------------------

pascalParser::BlockContext::BlockContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::CompoundStatementContext* pascalParser::BlockContext::compoundStatement() {
  return getRuleContext<pascalParser::CompoundStatementContext>(0);
}

std::vector<pascalParser::LabelDeclarationPartContext *> pascalParser::BlockContext::labelDeclarationPart() {
  return getRuleContexts<pascalParser::LabelDeclarationPartContext>();
}

pascalParser::LabelDeclarationPartContext* pascalParser::BlockContext::labelDeclarationPart(size_t i) {
  return getRuleContext<pascalParser::LabelDeclarationPartContext>(i);
}

std::vector<pascalParser::ConstantDefinitionPartContext *> pascalParser::BlockContext::constantDefinitionPart() {
  return getRuleContexts<pascalParser::ConstantDefinitionPartContext>();
}

pascalParser::ConstantDefinitionPartContext* pascalParser::BlockContext::constantDefinitionPart(size_t i) {
  return getRuleContext<pascalParser::ConstantDefinitionPartContext>(i);
}

std::vector<pascalParser::TypeDefinitionPartContext *> pascalParser::BlockContext::typeDefinitionPart() {
  return getRuleContexts<pascalParser::TypeDefinitionPartContext>();
}

pascalParser::TypeDefinitionPartContext* pascalParser::BlockContext::typeDefinitionPart(size_t i) {
  return getRuleContext<pascalParser::TypeDefinitionPartContext>(i);
}

std::vector<pascalParser::VariableDeclarationPartContext *> pascalParser::BlockContext::variableDeclarationPart() {
  return getRuleContexts<pascalParser::VariableDeclarationPartContext>();
}

pascalParser::VariableDeclarationPartContext* pascalParser::BlockContext::variableDeclarationPart(size_t i) {
  return getRuleContext<pascalParser::VariableDeclarationPartContext>(i);
}

std::vector<pascalParser::ProcedureAndFunctionDeclarationPartContext *> pascalParser::BlockContext::procedureAndFunctionDeclarationPart() {
  return getRuleContexts<pascalParser::ProcedureAndFunctionDeclarationPartContext>();
}

pascalParser::ProcedureAndFunctionDeclarationPartContext* pascalParser::BlockContext::procedureAndFunctionDeclarationPart(size_t i) {
  return getRuleContext<pascalParser::ProcedureAndFunctionDeclarationPartContext>(i);
}

std::vector<pascalParser::UsesUnitsPartContext *> pascalParser::BlockContext::usesUnitsPart() {
  return getRuleContexts<pascalParser::UsesUnitsPartContext>();
}

pascalParser::UsesUnitsPartContext* pascalParser::BlockContext::usesUnitsPart(size_t i) {
  return getRuleContext<pascalParser::UsesUnitsPartContext>(i);
}

std::vector<tree::TerminalNode *> pascalParser::BlockContext::IMPLEMENTATION() {
  return getTokens(pascalParser::IMPLEMENTATION);
}

tree::TerminalNode* pascalParser::BlockContext::IMPLEMENTATION(size_t i) {
  return getToken(pascalParser::IMPLEMENTATION, i);
}


size_t pascalParser::BlockContext::getRuleIndex() const {
  return pascalParser::RuleBlock;
}

void pascalParser::BlockContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterBlock(this);
}

void pascalParser::BlockContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitBlock(this);
}


antlrcpp::Any pascalParser::BlockContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitBlock(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::BlockContext* pascalParser::block() {
  BlockContext *_localctx = _tracker.createInstance<BlockContext>(_ctx, getState());
  enterRule(_localctx, 6, pascalParser::RuleBlock);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(228);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (((((_la - 8) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 8)) & ((1ULL << (pascalParser::CONST - 8))
      | (1ULL << (pascalParser::FUNCTION - 8))
      | (1ULL << (pascalParser::LABEL - 8))
      | (1ULL << (pascalParser::PROCEDURE - 8))
      | (1ULL << (pascalParser::TYPE - 8))
      | (1ULL << (pascalParser::VAR - 8))
      | (1ULL << (pascalParser::USES - 8))
      | (1ULL << (pascalParser::IMPLEMENTATION - 8)))) != 0)) {
      setState(226);
      _errHandler->sync(this);
      switch (_input->LA(1)) {
        case pascalParser::LABEL: {
          setState(219);
          labelDeclarationPart();
          break;
        }

        case pascalParser::CONST: {
          setState(220);
          constantDefinitionPart();
          break;
        }

        case pascalParser::TYPE: {
          setState(221);
          typeDefinitionPart();
          break;
        }

        case pascalParser::VAR: {
          setState(222);
          variableDeclarationPart();
          break;
        }

        case pascalParser::FUNCTION:
        case pascalParser::PROCEDURE: {
          setState(223);
          procedureAndFunctionDeclarationPart();
          break;
        }

        case pascalParser::USES: {
          setState(224);
          usesUnitsPart();
          break;
        }

        case pascalParser::IMPLEMENTATION: {
          setState(225);
          match(pascalParser::IMPLEMENTATION);
          break;
        }

      default:
        throw NoViableAltException(this);
      }
      setState(230);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(231);
    compoundStatement();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- UsesUnitsPartContext ------------------------------------------------------------------

pascalParser::UsesUnitsPartContext::UsesUnitsPartContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::UsesUnitsPartContext::USES() {
  return getToken(pascalParser::USES, 0);
}

pascalParser::IdentifierListContext* pascalParser::UsesUnitsPartContext::identifierList() {
  return getRuleContext<pascalParser::IdentifierListContext>(0);
}

tree::TerminalNode* pascalParser::UsesUnitsPartContext::SEMI() {
  return getToken(pascalParser::SEMI, 0);
}


size_t pascalParser::UsesUnitsPartContext::getRuleIndex() const {
  return pascalParser::RuleUsesUnitsPart;
}

void pascalParser::UsesUnitsPartContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterUsesUnitsPart(this);
}

void pascalParser::UsesUnitsPartContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitUsesUnitsPart(this);
}


antlrcpp::Any pascalParser::UsesUnitsPartContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitUsesUnitsPart(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::UsesUnitsPartContext* pascalParser::usesUnitsPart() {
  UsesUnitsPartContext *_localctx = _tracker.createInstance<UsesUnitsPartContext>(_ctx, getState());
  enterRule(_localctx, 8, pascalParser::RuleUsesUnitsPart);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(233);
    match(pascalParser::USES);
    setState(234);
    identifierList();
    setState(235);
    match(pascalParser::SEMI);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- LabelDeclarationPartContext ------------------------------------------------------------------

pascalParser::LabelDeclarationPartContext::LabelDeclarationPartContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::LabelDeclarationPartContext::LABEL() {
  return getToken(pascalParser::LABEL, 0);
}

std::vector<pascalParser::LabelContext *> pascalParser::LabelDeclarationPartContext::label() {
  return getRuleContexts<pascalParser::LabelContext>();
}

pascalParser::LabelContext* pascalParser::LabelDeclarationPartContext::label(size_t i) {
  return getRuleContext<pascalParser::LabelContext>(i);
}

tree::TerminalNode* pascalParser::LabelDeclarationPartContext::SEMI() {
  return getToken(pascalParser::SEMI, 0);
}

std::vector<tree::TerminalNode *> pascalParser::LabelDeclarationPartContext::COMMA() {
  return getTokens(pascalParser::COMMA);
}

tree::TerminalNode* pascalParser::LabelDeclarationPartContext::COMMA(size_t i) {
  return getToken(pascalParser::COMMA, i);
}


size_t pascalParser::LabelDeclarationPartContext::getRuleIndex() const {
  return pascalParser::RuleLabelDeclarationPart;
}

void pascalParser::LabelDeclarationPartContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterLabelDeclarationPart(this);
}

void pascalParser::LabelDeclarationPartContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitLabelDeclarationPart(this);
}


antlrcpp::Any pascalParser::LabelDeclarationPartContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitLabelDeclarationPart(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::LabelDeclarationPartContext* pascalParser::labelDeclarationPart() {
  LabelDeclarationPartContext *_localctx = _tracker.createInstance<LabelDeclarationPartContext>(_ctx, getState());
  enterRule(_localctx, 10, pascalParser::RuleLabelDeclarationPart);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(237);
    match(pascalParser::LABEL);
    setState(238);
    label();
    setState(243);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == pascalParser::COMMA) {
      setState(239);
      match(pascalParser::COMMA);
      setState(240);
      label();
      setState(245);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(246);
    match(pascalParser::SEMI);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- LabelContext ------------------------------------------------------------------

pascalParser::LabelContext::LabelContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::UnsignedIntegerContext* pascalParser::LabelContext::unsignedInteger() {
  return getRuleContext<pascalParser::UnsignedIntegerContext>(0);
}


size_t pascalParser::LabelContext::getRuleIndex() const {
  return pascalParser::RuleLabel;
}

void pascalParser::LabelContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterLabel(this);
}

void pascalParser::LabelContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitLabel(this);
}


antlrcpp::Any pascalParser::LabelContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitLabel(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::LabelContext* pascalParser::label() {
  LabelContext *_localctx = _tracker.createInstance<LabelContext>(_ctx, getState());
  enterRule(_localctx, 12, pascalParser::RuleLabel);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(248);
    unsignedInteger();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ConstantDefinitionPartContext ------------------------------------------------------------------

pascalParser::ConstantDefinitionPartContext::ConstantDefinitionPartContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::ConstantDefinitionPartContext::CONST() {
  return getToken(pascalParser::CONST, 0);
}

std::vector<pascalParser::ConstantDefinitionContext *> pascalParser::ConstantDefinitionPartContext::constantDefinition() {
  return getRuleContexts<pascalParser::ConstantDefinitionContext>();
}

pascalParser::ConstantDefinitionContext* pascalParser::ConstantDefinitionPartContext::constantDefinition(size_t i) {
  return getRuleContext<pascalParser::ConstantDefinitionContext>(i);
}

std::vector<tree::TerminalNode *> pascalParser::ConstantDefinitionPartContext::SEMI() {
  return getTokens(pascalParser::SEMI);
}

tree::TerminalNode* pascalParser::ConstantDefinitionPartContext::SEMI(size_t i) {
  return getToken(pascalParser::SEMI, i);
}


size_t pascalParser::ConstantDefinitionPartContext::getRuleIndex() const {
  return pascalParser::RuleConstantDefinitionPart;
}

void pascalParser::ConstantDefinitionPartContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterConstantDefinitionPart(this);
}

void pascalParser::ConstantDefinitionPartContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitConstantDefinitionPart(this);
}


antlrcpp::Any pascalParser::ConstantDefinitionPartContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitConstantDefinitionPart(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ConstantDefinitionPartContext* pascalParser::constantDefinitionPart() {
  ConstantDefinitionPartContext *_localctx = _tracker.createInstance<ConstantDefinitionPartContext>(_ctx, getState());
  enterRule(_localctx, 14, pascalParser::RuleConstantDefinitionPart);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(250);
    match(pascalParser::CONST);
    setState(254); 
    _errHandler->sync(this);
    _la = _input->LA(1);
    do {
      setState(251);
      constantDefinition();
      setState(252);
      match(pascalParser::SEMI);
      setState(256); 
      _errHandler->sync(this);
      _la = _input->LA(1);
    } while (_la == pascalParser::IDENT);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ConstantDefinitionContext ------------------------------------------------------------------

pascalParser::ConstantDefinitionContext::ConstantDefinitionContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::IdentifierContext* pascalParser::ConstantDefinitionContext::identifier() {
  return getRuleContext<pascalParser::IdentifierContext>(0);
}

tree::TerminalNode* pascalParser::ConstantDefinitionContext::EQUAL() {
  return getToken(pascalParser::EQUAL, 0);
}

pascalParser::ConstantContext* pascalParser::ConstantDefinitionContext::constant() {
  return getRuleContext<pascalParser::ConstantContext>(0);
}


size_t pascalParser::ConstantDefinitionContext::getRuleIndex() const {
  return pascalParser::RuleConstantDefinition;
}

void pascalParser::ConstantDefinitionContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterConstantDefinition(this);
}

void pascalParser::ConstantDefinitionContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitConstantDefinition(this);
}


antlrcpp::Any pascalParser::ConstantDefinitionContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitConstantDefinition(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ConstantDefinitionContext* pascalParser::constantDefinition() {
  ConstantDefinitionContext *_localctx = _tracker.createInstance<ConstantDefinitionContext>(_ctx, getState());
  enterRule(_localctx, 16, pascalParser::RuleConstantDefinition);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(258);
    identifier();
    setState(259);
    match(pascalParser::EQUAL);
    setState(260);
    constant();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ConstantChrContext ------------------------------------------------------------------

pascalParser::ConstantChrContext::ConstantChrContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::ConstantChrContext::CHR() {
  return getToken(pascalParser::CHR, 0);
}

tree::TerminalNode* pascalParser::ConstantChrContext::LPAREN() {
  return getToken(pascalParser::LPAREN, 0);
}

pascalParser::UnsignedIntegerContext* pascalParser::ConstantChrContext::unsignedInteger() {
  return getRuleContext<pascalParser::UnsignedIntegerContext>(0);
}

tree::TerminalNode* pascalParser::ConstantChrContext::RPAREN() {
  return getToken(pascalParser::RPAREN, 0);
}


size_t pascalParser::ConstantChrContext::getRuleIndex() const {
  return pascalParser::RuleConstantChr;
}

void pascalParser::ConstantChrContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterConstantChr(this);
}

void pascalParser::ConstantChrContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitConstantChr(this);
}


antlrcpp::Any pascalParser::ConstantChrContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitConstantChr(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ConstantChrContext* pascalParser::constantChr() {
  ConstantChrContext *_localctx = _tracker.createInstance<ConstantChrContext>(_ctx, getState());
  enterRule(_localctx, 18, pascalParser::RuleConstantChr);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(262);
    match(pascalParser::CHR);
    setState(263);
    match(pascalParser::LPAREN);
    setState(264);
    unsignedInteger();
    setState(265);
    match(pascalParser::RPAREN);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ConstantContext ------------------------------------------------------------------

pascalParser::ConstantContext::ConstantContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::UnsignedNumberContext* pascalParser::ConstantContext::unsignedNumber() {
  return getRuleContext<pascalParser::UnsignedNumberContext>(0);
}

pascalParser::SignContext* pascalParser::ConstantContext::sign() {
  return getRuleContext<pascalParser::SignContext>(0);
}

pascalParser::IdentifierContext* pascalParser::ConstantContext::identifier() {
  return getRuleContext<pascalParser::IdentifierContext>(0);
}

pascalParser::StringContext* pascalParser::ConstantContext::string() {
  return getRuleContext<pascalParser::StringContext>(0);
}

pascalParser::ConstantChrContext* pascalParser::ConstantContext::constantChr() {
  return getRuleContext<pascalParser::ConstantChrContext>(0);
}


size_t pascalParser::ConstantContext::getRuleIndex() const {
  return pascalParser::RuleConstant;
}

void pascalParser::ConstantContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterConstant(this);
}

void pascalParser::ConstantContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitConstant(this);
}


antlrcpp::Any pascalParser::ConstantContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitConstant(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ConstantContext* pascalParser::constant() {
  ConstantContext *_localctx = _tracker.createInstance<ConstantContext>(_ctx, getState());
  enterRule(_localctx, 20, pascalParser::RuleConstant);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(277);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 7, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(267);
      unsignedNumber();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(268);
      sign();
      setState(269);
      unsignedNumber();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(271);
      identifier();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(272);
      sign();
      setState(273);
      identifier();
      break;
    }

    case 5: {
      enterOuterAlt(_localctx, 5);
      setState(275);
      string();
      break;
    }

    case 6: {
      enterOuterAlt(_localctx, 6);
      setState(276);
      constantChr();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- UnsignedNumberContext ------------------------------------------------------------------

pascalParser::UnsignedNumberContext::UnsignedNumberContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::UnsignedIntegerContext* pascalParser::UnsignedNumberContext::unsignedInteger() {
  return getRuleContext<pascalParser::UnsignedIntegerContext>(0);
}

pascalParser::UnsignedRealContext* pascalParser::UnsignedNumberContext::unsignedReal() {
  return getRuleContext<pascalParser::UnsignedRealContext>(0);
}


size_t pascalParser::UnsignedNumberContext::getRuleIndex() const {
  return pascalParser::RuleUnsignedNumber;
}

void pascalParser::UnsignedNumberContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterUnsignedNumber(this);
}

void pascalParser::UnsignedNumberContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitUnsignedNumber(this);
}


antlrcpp::Any pascalParser::UnsignedNumberContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitUnsignedNumber(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::UnsignedNumberContext* pascalParser::unsignedNumber() {
  UnsignedNumberContext *_localctx = _tracker.createInstance<UnsignedNumberContext>(_ctx, getState());
  enterRule(_localctx, 22, pascalParser::RuleUnsignedNumber);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(281);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::NUM_INT: {
        enterOuterAlt(_localctx, 1);
        setState(279);
        unsignedInteger();
        break;
      }

      case pascalParser::NUM_REAL: {
        enterOuterAlt(_localctx, 2);
        setState(280);
        unsignedReal();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- UnsignedIntegerContext ------------------------------------------------------------------

pascalParser::UnsignedIntegerContext::UnsignedIntegerContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::UnsignedIntegerContext::NUM_INT() {
  return getToken(pascalParser::NUM_INT, 0);
}


size_t pascalParser::UnsignedIntegerContext::getRuleIndex() const {
  return pascalParser::RuleUnsignedInteger;
}

void pascalParser::UnsignedIntegerContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterUnsignedInteger(this);
}

void pascalParser::UnsignedIntegerContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitUnsignedInteger(this);
}


antlrcpp::Any pascalParser::UnsignedIntegerContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitUnsignedInteger(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::UnsignedIntegerContext* pascalParser::unsignedInteger() {
  UnsignedIntegerContext *_localctx = _tracker.createInstance<UnsignedIntegerContext>(_ctx, getState());
  enterRule(_localctx, 24, pascalParser::RuleUnsignedInteger);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(283);
    match(pascalParser::NUM_INT);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- UnsignedRealContext ------------------------------------------------------------------

pascalParser::UnsignedRealContext::UnsignedRealContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::UnsignedRealContext::NUM_REAL() {
  return getToken(pascalParser::NUM_REAL, 0);
}


size_t pascalParser::UnsignedRealContext::getRuleIndex() const {
  return pascalParser::RuleUnsignedReal;
}

void pascalParser::UnsignedRealContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterUnsignedReal(this);
}

void pascalParser::UnsignedRealContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitUnsignedReal(this);
}


antlrcpp::Any pascalParser::UnsignedRealContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitUnsignedReal(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::UnsignedRealContext* pascalParser::unsignedReal() {
  UnsignedRealContext *_localctx = _tracker.createInstance<UnsignedRealContext>(_ctx, getState());
  enterRule(_localctx, 26, pascalParser::RuleUnsignedReal);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(285);
    match(pascalParser::NUM_REAL);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SignContext ------------------------------------------------------------------

pascalParser::SignContext::SignContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::SignContext::PLUS() {
  return getToken(pascalParser::PLUS, 0);
}

tree::TerminalNode* pascalParser::SignContext::MINUS() {
  return getToken(pascalParser::MINUS, 0);
}


size_t pascalParser::SignContext::getRuleIndex() const {
  return pascalParser::RuleSign;
}

void pascalParser::SignContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSign(this);
}

void pascalParser::SignContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSign(this);
}


antlrcpp::Any pascalParser::SignContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitSign(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::SignContext* pascalParser::sign() {
  SignContext *_localctx = _tracker.createInstance<SignContext>(_ctx, getState());
  enterRule(_localctx, 28, pascalParser::RuleSign);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(287);
    _la = _input->LA(1);
    if (!(_la == pascalParser::PLUS

    || _la == pascalParser::MINUS)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Bool_Context ------------------------------------------------------------------

pascalParser::Bool_Context::Bool_Context(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::Bool_Context::TRUE() {
  return getToken(pascalParser::TRUE, 0);
}

tree::TerminalNode* pascalParser::Bool_Context::FALSE() {
  return getToken(pascalParser::FALSE, 0);
}


size_t pascalParser::Bool_Context::getRuleIndex() const {
  return pascalParser::RuleBool_;
}

void pascalParser::Bool_Context::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterBool_(this);
}

void pascalParser::Bool_Context::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitBool_(this);
}


antlrcpp::Any pascalParser::Bool_Context::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitBool_(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::Bool_Context* pascalParser::bool_() {
  Bool_Context *_localctx = _tracker.createInstance<Bool_Context>(_ctx, getState());
  enterRule(_localctx, 30, pascalParser::RuleBool_);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(289);
    _la = _input->LA(1);
    if (!(_la == pascalParser::TRUE

    || _la == pascalParser::FALSE)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StringContext ------------------------------------------------------------------

pascalParser::StringContext::StringContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::StringContext::STRING_LITERAL() {
  return getToken(pascalParser::STRING_LITERAL, 0);
}


size_t pascalParser::StringContext::getRuleIndex() const {
  return pascalParser::RuleString;
}

void pascalParser::StringContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterString(this);
}

void pascalParser::StringContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitString(this);
}


antlrcpp::Any pascalParser::StringContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitString(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::StringContext* pascalParser::string() {
  StringContext *_localctx = _tracker.createInstance<StringContext>(_ctx, getState());
  enterRule(_localctx, 32, pascalParser::RuleString);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(291);
    match(pascalParser::STRING_LITERAL);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TypeDefinitionPartContext ------------------------------------------------------------------

pascalParser::TypeDefinitionPartContext::TypeDefinitionPartContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::TypeDefinitionPartContext::TYPE() {
  return getToken(pascalParser::TYPE, 0);
}

std::vector<pascalParser::TypeDefinitionContext *> pascalParser::TypeDefinitionPartContext::typeDefinition() {
  return getRuleContexts<pascalParser::TypeDefinitionContext>();
}

pascalParser::TypeDefinitionContext* pascalParser::TypeDefinitionPartContext::typeDefinition(size_t i) {
  return getRuleContext<pascalParser::TypeDefinitionContext>(i);
}

std::vector<tree::TerminalNode *> pascalParser::TypeDefinitionPartContext::SEMI() {
  return getTokens(pascalParser::SEMI);
}

tree::TerminalNode* pascalParser::TypeDefinitionPartContext::SEMI(size_t i) {
  return getToken(pascalParser::SEMI, i);
}


size_t pascalParser::TypeDefinitionPartContext::getRuleIndex() const {
  return pascalParser::RuleTypeDefinitionPart;
}

void pascalParser::TypeDefinitionPartContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterTypeDefinitionPart(this);
}

void pascalParser::TypeDefinitionPartContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitTypeDefinitionPart(this);
}


antlrcpp::Any pascalParser::TypeDefinitionPartContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitTypeDefinitionPart(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::TypeDefinitionPartContext* pascalParser::typeDefinitionPart() {
  TypeDefinitionPartContext *_localctx = _tracker.createInstance<TypeDefinitionPartContext>(_ctx, getState());
  enterRule(_localctx, 34, pascalParser::RuleTypeDefinitionPart);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(293);
    match(pascalParser::TYPE);
    setState(297); 
    _errHandler->sync(this);
    _la = _input->LA(1);
    do {
      setState(294);
      typeDefinition();
      setState(295);
      match(pascalParser::SEMI);
      setState(299); 
      _errHandler->sync(this);
      _la = _input->LA(1);
    } while (_la == pascalParser::IDENT);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TypeDefinitionContext ------------------------------------------------------------------

pascalParser::TypeDefinitionContext::TypeDefinitionContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::IdentifierContext* pascalParser::TypeDefinitionContext::identifier() {
  return getRuleContext<pascalParser::IdentifierContext>(0);
}

tree::TerminalNode* pascalParser::TypeDefinitionContext::EQUAL() {
  return getToken(pascalParser::EQUAL, 0);
}

pascalParser::Type_Context* pascalParser::TypeDefinitionContext::type_() {
  return getRuleContext<pascalParser::Type_Context>(0);
}

pascalParser::FunctionTypeContext* pascalParser::TypeDefinitionContext::functionType() {
  return getRuleContext<pascalParser::FunctionTypeContext>(0);
}

pascalParser::ProcedureTypeContext* pascalParser::TypeDefinitionContext::procedureType() {
  return getRuleContext<pascalParser::ProcedureTypeContext>(0);
}


size_t pascalParser::TypeDefinitionContext::getRuleIndex() const {
  return pascalParser::RuleTypeDefinition;
}

void pascalParser::TypeDefinitionContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterTypeDefinition(this);
}

void pascalParser::TypeDefinitionContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitTypeDefinition(this);
}


antlrcpp::Any pascalParser::TypeDefinitionContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitTypeDefinition(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::TypeDefinitionContext* pascalParser::typeDefinition() {
  TypeDefinitionContext *_localctx = _tracker.createInstance<TypeDefinitionContext>(_ctx, getState());
  enterRule(_localctx, 36, pascalParser::RuleTypeDefinition);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(301);
    identifier();
    setState(302);
    match(pascalParser::EQUAL);
    setState(306);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::ARRAY:
      case pascalParser::BOOLEAN:
      case pascalParser::CHAR:
      case pascalParser::CHR:
      case pascalParser::FILE:
      case pascalParser::INTEGER:
      case pascalParser::PACKED:
      case pascalParser::REAL:
      case pascalParser::RECORD:
      case pascalParser::SET:
      case pascalParser::PLUS:
      case pascalParser::MINUS:
      case pascalParser::LPAREN:
      case pascalParser::POINTER:
      case pascalParser::STRING:
      case pascalParser::IDENT:
      case pascalParser::STRING_LITERAL:
      case pascalParser::NUM_INT:
      case pascalParser::NUM_REAL: {
        setState(303);
        type_();
        break;
      }

      case pascalParser::FUNCTION: {
        setState(304);
        functionType();
        break;
      }

      case pascalParser::PROCEDURE: {
        setState(305);
        procedureType();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FunctionTypeContext ------------------------------------------------------------------

pascalParser::FunctionTypeContext::FunctionTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::FunctionTypeContext::FUNCTION() {
  return getToken(pascalParser::FUNCTION, 0);
}

tree::TerminalNode* pascalParser::FunctionTypeContext::COLON() {
  return getToken(pascalParser::COLON, 0);
}

pascalParser::ResultTypeContext* pascalParser::FunctionTypeContext::resultType() {
  return getRuleContext<pascalParser::ResultTypeContext>(0);
}

pascalParser::FormalParameterListContext* pascalParser::FunctionTypeContext::formalParameterList() {
  return getRuleContext<pascalParser::FormalParameterListContext>(0);
}


size_t pascalParser::FunctionTypeContext::getRuleIndex() const {
  return pascalParser::RuleFunctionType;
}

void pascalParser::FunctionTypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFunctionType(this);
}

void pascalParser::FunctionTypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFunctionType(this);
}


antlrcpp::Any pascalParser::FunctionTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitFunctionType(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::FunctionTypeContext* pascalParser::functionType() {
  FunctionTypeContext *_localctx = _tracker.createInstance<FunctionTypeContext>(_ctx, getState());
  enterRule(_localctx, 38, pascalParser::RuleFunctionType);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(308);
    match(pascalParser::FUNCTION);
    setState(310);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == pascalParser::LPAREN) {
      setState(309);
      formalParameterList();
    }
    setState(312);
    match(pascalParser::COLON);
    setState(313);
    resultType();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ProcedureTypeContext ------------------------------------------------------------------

pascalParser::ProcedureTypeContext::ProcedureTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::ProcedureTypeContext::PROCEDURE() {
  return getToken(pascalParser::PROCEDURE, 0);
}

pascalParser::FormalParameterListContext* pascalParser::ProcedureTypeContext::formalParameterList() {
  return getRuleContext<pascalParser::FormalParameterListContext>(0);
}


size_t pascalParser::ProcedureTypeContext::getRuleIndex() const {
  return pascalParser::RuleProcedureType;
}

void pascalParser::ProcedureTypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProcedureType(this);
}

void pascalParser::ProcedureTypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProcedureType(this);
}


antlrcpp::Any pascalParser::ProcedureTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitProcedureType(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ProcedureTypeContext* pascalParser::procedureType() {
  ProcedureTypeContext *_localctx = _tracker.createInstance<ProcedureTypeContext>(_ctx, getState());
  enterRule(_localctx, 40, pascalParser::RuleProcedureType);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(315);
    match(pascalParser::PROCEDURE);
    setState(317);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == pascalParser::LPAREN) {
      setState(316);
      formalParameterList();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Type_Context ------------------------------------------------------------------

pascalParser::Type_Context::Type_Context(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::SimpleTypeContext* pascalParser::Type_Context::simpleType() {
  return getRuleContext<pascalParser::SimpleTypeContext>(0);
}

pascalParser::StructuredTypeContext* pascalParser::Type_Context::structuredType() {
  return getRuleContext<pascalParser::StructuredTypeContext>(0);
}

pascalParser::PointerTypeContext* pascalParser::Type_Context::pointerType() {
  return getRuleContext<pascalParser::PointerTypeContext>(0);
}


size_t pascalParser::Type_Context::getRuleIndex() const {
  return pascalParser::RuleType_;
}

void pascalParser::Type_Context::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterType_(this);
}

void pascalParser::Type_Context::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitType_(this);
}


antlrcpp::Any pascalParser::Type_Context::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitType_(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::Type_Context* pascalParser::type_() {
  Type_Context *_localctx = _tracker.createInstance<Type_Context>(_ctx, getState());
  enterRule(_localctx, 42, pascalParser::RuleType_);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(322);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::BOOLEAN:
      case pascalParser::CHAR:
      case pascalParser::CHR:
      case pascalParser::INTEGER:
      case pascalParser::REAL:
      case pascalParser::PLUS:
      case pascalParser::MINUS:
      case pascalParser::LPAREN:
      case pascalParser::STRING:
      case pascalParser::IDENT:
      case pascalParser::STRING_LITERAL:
      case pascalParser::NUM_INT:
      case pascalParser::NUM_REAL: {
        enterOuterAlt(_localctx, 1);
        setState(319);
        simpleType();
        break;
      }

      case pascalParser::ARRAY:
      case pascalParser::FILE:
      case pascalParser::PACKED:
      case pascalParser::RECORD:
      case pascalParser::SET: {
        enterOuterAlt(_localctx, 2);
        setState(320);
        structuredType();
        break;
      }

      case pascalParser::POINTER: {
        enterOuterAlt(_localctx, 3);
        setState(321);
        pointerType();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SimpleTypeContext ------------------------------------------------------------------

pascalParser::SimpleTypeContext::SimpleTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::ScalarTypeContext* pascalParser::SimpleTypeContext::scalarType() {
  return getRuleContext<pascalParser::ScalarTypeContext>(0);
}

pascalParser::SubrangeTypeContext* pascalParser::SimpleTypeContext::subrangeType() {
  return getRuleContext<pascalParser::SubrangeTypeContext>(0);
}

pascalParser::TypeIdentifierContext* pascalParser::SimpleTypeContext::typeIdentifier() {
  return getRuleContext<pascalParser::TypeIdentifierContext>(0);
}

pascalParser::StringtypeContext* pascalParser::SimpleTypeContext::stringtype() {
  return getRuleContext<pascalParser::StringtypeContext>(0);
}


size_t pascalParser::SimpleTypeContext::getRuleIndex() const {
  return pascalParser::RuleSimpleType;
}

void pascalParser::SimpleTypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSimpleType(this);
}

void pascalParser::SimpleTypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSimpleType(this);
}


antlrcpp::Any pascalParser::SimpleTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitSimpleType(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::SimpleTypeContext* pascalParser::simpleType() {
  SimpleTypeContext *_localctx = _tracker.createInstance<SimpleTypeContext>(_ctx, getState());
  enterRule(_localctx, 44, pascalParser::RuleSimpleType);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(328);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 14, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(324);
      scalarType();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(325);
      subrangeType();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(326);
      typeIdentifier();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(327);
      stringtype();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ScalarTypeContext ------------------------------------------------------------------

pascalParser::ScalarTypeContext::ScalarTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::ScalarTypeContext::LPAREN() {
  return getToken(pascalParser::LPAREN, 0);
}

pascalParser::IdentifierListContext* pascalParser::ScalarTypeContext::identifierList() {
  return getRuleContext<pascalParser::IdentifierListContext>(0);
}

tree::TerminalNode* pascalParser::ScalarTypeContext::RPAREN() {
  return getToken(pascalParser::RPAREN, 0);
}


size_t pascalParser::ScalarTypeContext::getRuleIndex() const {
  return pascalParser::RuleScalarType;
}

void pascalParser::ScalarTypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterScalarType(this);
}

void pascalParser::ScalarTypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitScalarType(this);
}


antlrcpp::Any pascalParser::ScalarTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitScalarType(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ScalarTypeContext* pascalParser::scalarType() {
  ScalarTypeContext *_localctx = _tracker.createInstance<ScalarTypeContext>(_ctx, getState());
  enterRule(_localctx, 46, pascalParser::RuleScalarType);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(330);
    match(pascalParser::LPAREN);
    setState(331);
    identifierList();
    setState(332);
    match(pascalParser::RPAREN);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SubrangeTypeContext ------------------------------------------------------------------

pascalParser::SubrangeTypeContext::SubrangeTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<pascalParser::ConstantContext *> pascalParser::SubrangeTypeContext::constant() {
  return getRuleContexts<pascalParser::ConstantContext>();
}

pascalParser::ConstantContext* pascalParser::SubrangeTypeContext::constant(size_t i) {
  return getRuleContext<pascalParser::ConstantContext>(i);
}

tree::TerminalNode* pascalParser::SubrangeTypeContext::DOTDOT() {
  return getToken(pascalParser::DOTDOT, 0);
}


size_t pascalParser::SubrangeTypeContext::getRuleIndex() const {
  return pascalParser::RuleSubrangeType;
}

void pascalParser::SubrangeTypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSubrangeType(this);
}

void pascalParser::SubrangeTypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSubrangeType(this);
}


antlrcpp::Any pascalParser::SubrangeTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitSubrangeType(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::SubrangeTypeContext* pascalParser::subrangeType() {
  SubrangeTypeContext *_localctx = _tracker.createInstance<SubrangeTypeContext>(_ctx, getState());
  enterRule(_localctx, 48, pascalParser::RuleSubrangeType);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(334);
    constant();
    setState(335);
    match(pascalParser::DOTDOT);
    setState(336);
    constant();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TypeIdentifierContext ------------------------------------------------------------------

pascalParser::TypeIdentifierContext::TypeIdentifierContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::IdentifierContext* pascalParser::TypeIdentifierContext::identifier() {
  return getRuleContext<pascalParser::IdentifierContext>(0);
}

tree::TerminalNode* pascalParser::TypeIdentifierContext::CHAR() {
  return getToken(pascalParser::CHAR, 0);
}

tree::TerminalNode* pascalParser::TypeIdentifierContext::BOOLEAN() {
  return getToken(pascalParser::BOOLEAN, 0);
}

tree::TerminalNode* pascalParser::TypeIdentifierContext::INTEGER() {
  return getToken(pascalParser::INTEGER, 0);
}

tree::TerminalNode* pascalParser::TypeIdentifierContext::REAL() {
  return getToken(pascalParser::REAL, 0);
}

tree::TerminalNode* pascalParser::TypeIdentifierContext::STRING() {
  return getToken(pascalParser::STRING, 0);
}


size_t pascalParser::TypeIdentifierContext::getRuleIndex() const {
  return pascalParser::RuleTypeIdentifier;
}

void pascalParser::TypeIdentifierContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterTypeIdentifier(this);
}

void pascalParser::TypeIdentifierContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitTypeIdentifier(this);
}


antlrcpp::Any pascalParser::TypeIdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitTypeIdentifier(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::TypeIdentifierContext* pascalParser::typeIdentifier() {
  TypeIdentifierContext *_localctx = _tracker.createInstance<TypeIdentifierContext>(_ctx, getState());
  enterRule(_localctx, 50, pascalParser::RuleTypeIdentifier);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(340);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::IDENT: {
        enterOuterAlt(_localctx, 1);
        setState(338);
        identifier();
        break;
      }

      case pascalParser::BOOLEAN:
      case pascalParser::CHAR:
      case pascalParser::INTEGER:
      case pascalParser::REAL:
      case pascalParser::STRING: {
        enterOuterAlt(_localctx, 2);
        setState(339);
        _la = _input->LA(1);
        if (!((((_la & ~ 0x3fULL) == 0) &&
          ((1ULL << _la) & ((1ULL << pascalParser::BOOLEAN)
          | (1ULL << pascalParser::CHAR)
          | (1ULL << pascalParser::INTEGER)
          | (1ULL << pascalParser::REAL))) != 0) || _la == pascalParser::STRING)) {
        _errHandler->recoverInline(this);
        }
        else {
          _errHandler->reportMatch(this);
          consume();
        }
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StructuredTypeContext ------------------------------------------------------------------

pascalParser::StructuredTypeContext::StructuredTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::StructuredTypeContext::PACKED() {
  return getToken(pascalParser::PACKED, 0);
}

pascalParser::UnpackedStructuredTypeContext* pascalParser::StructuredTypeContext::unpackedStructuredType() {
  return getRuleContext<pascalParser::UnpackedStructuredTypeContext>(0);
}


size_t pascalParser::StructuredTypeContext::getRuleIndex() const {
  return pascalParser::RuleStructuredType;
}

void pascalParser::StructuredTypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStructuredType(this);
}

void pascalParser::StructuredTypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStructuredType(this);
}


antlrcpp::Any pascalParser::StructuredTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitStructuredType(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::StructuredTypeContext* pascalParser::structuredType() {
  StructuredTypeContext *_localctx = _tracker.createInstance<StructuredTypeContext>(_ctx, getState());
  enterRule(_localctx, 52, pascalParser::RuleStructuredType);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(345);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::PACKED: {
        enterOuterAlt(_localctx, 1);
        setState(342);
        match(pascalParser::PACKED);
        setState(343);
        unpackedStructuredType();
        break;
      }

      case pascalParser::ARRAY:
      case pascalParser::FILE:
      case pascalParser::RECORD:
      case pascalParser::SET: {
        enterOuterAlt(_localctx, 2);
        setState(344);
        unpackedStructuredType();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- UnpackedStructuredTypeContext ------------------------------------------------------------------

pascalParser::UnpackedStructuredTypeContext::UnpackedStructuredTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::ArrayTypeContext* pascalParser::UnpackedStructuredTypeContext::arrayType() {
  return getRuleContext<pascalParser::ArrayTypeContext>(0);
}

pascalParser::RecordTypeContext* pascalParser::UnpackedStructuredTypeContext::recordType() {
  return getRuleContext<pascalParser::RecordTypeContext>(0);
}

pascalParser::SetTypeContext* pascalParser::UnpackedStructuredTypeContext::setType() {
  return getRuleContext<pascalParser::SetTypeContext>(0);
}

pascalParser::FileTypeContext* pascalParser::UnpackedStructuredTypeContext::fileType() {
  return getRuleContext<pascalParser::FileTypeContext>(0);
}


size_t pascalParser::UnpackedStructuredTypeContext::getRuleIndex() const {
  return pascalParser::RuleUnpackedStructuredType;
}

void pascalParser::UnpackedStructuredTypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterUnpackedStructuredType(this);
}

void pascalParser::UnpackedStructuredTypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitUnpackedStructuredType(this);
}


antlrcpp::Any pascalParser::UnpackedStructuredTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitUnpackedStructuredType(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::UnpackedStructuredTypeContext* pascalParser::unpackedStructuredType() {
  UnpackedStructuredTypeContext *_localctx = _tracker.createInstance<UnpackedStructuredTypeContext>(_ctx, getState());
  enterRule(_localctx, 54, pascalParser::RuleUnpackedStructuredType);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(351);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::ARRAY: {
        enterOuterAlt(_localctx, 1);
        setState(347);
        arrayType();
        break;
      }

      case pascalParser::RECORD: {
        enterOuterAlt(_localctx, 2);
        setState(348);
        recordType();
        break;
      }

      case pascalParser::SET: {
        enterOuterAlt(_localctx, 3);
        setState(349);
        setType();
        break;
      }

      case pascalParser::FILE: {
        enterOuterAlt(_localctx, 4);
        setState(350);
        fileType();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StringtypeContext ------------------------------------------------------------------

pascalParser::StringtypeContext::StringtypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::StringtypeContext::STRING() {
  return getToken(pascalParser::STRING, 0);
}

tree::TerminalNode* pascalParser::StringtypeContext::LBRACK() {
  return getToken(pascalParser::LBRACK, 0);
}

tree::TerminalNode* pascalParser::StringtypeContext::RBRACK() {
  return getToken(pascalParser::RBRACK, 0);
}

pascalParser::IdentifierContext* pascalParser::StringtypeContext::identifier() {
  return getRuleContext<pascalParser::IdentifierContext>(0);
}

pascalParser::UnsignedNumberContext* pascalParser::StringtypeContext::unsignedNumber() {
  return getRuleContext<pascalParser::UnsignedNumberContext>(0);
}


size_t pascalParser::StringtypeContext::getRuleIndex() const {
  return pascalParser::RuleStringtype;
}

void pascalParser::StringtypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStringtype(this);
}

void pascalParser::StringtypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStringtype(this);
}


antlrcpp::Any pascalParser::StringtypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitStringtype(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::StringtypeContext* pascalParser::stringtype() {
  StringtypeContext *_localctx = _tracker.createInstance<StringtypeContext>(_ctx, getState());
  enterRule(_localctx, 56, pascalParser::RuleStringtype);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(353);
    match(pascalParser::STRING);
    setState(354);
    match(pascalParser::LBRACK);
    setState(357);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::IDENT: {
        setState(355);
        identifier();
        break;
      }

      case pascalParser::NUM_INT:
      case pascalParser::NUM_REAL: {
        setState(356);
        unsignedNumber();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
    setState(359);
    match(pascalParser::RBRACK);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ArrayTypeContext ------------------------------------------------------------------

pascalParser::ArrayTypeContext::ArrayTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::ArrayTypeContext::ARRAY() {
  return getToken(pascalParser::ARRAY, 0);
}

tree::TerminalNode* pascalParser::ArrayTypeContext::LBRACK() {
  return getToken(pascalParser::LBRACK, 0);
}

pascalParser::TypeListContext* pascalParser::ArrayTypeContext::typeList() {
  return getRuleContext<pascalParser::TypeListContext>(0);
}

tree::TerminalNode* pascalParser::ArrayTypeContext::RBRACK() {
  return getToken(pascalParser::RBRACK, 0);
}

tree::TerminalNode* pascalParser::ArrayTypeContext::OF() {
  return getToken(pascalParser::OF, 0);
}

pascalParser::ComponentTypeContext* pascalParser::ArrayTypeContext::componentType() {
  return getRuleContext<pascalParser::ComponentTypeContext>(0);
}

tree::TerminalNode* pascalParser::ArrayTypeContext::LBRACK2() {
  return getToken(pascalParser::LBRACK2, 0);
}

tree::TerminalNode* pascalParser::ArrayTypeContext::RBRACK2() {
  return getToken(pascalParser::RBRACK2, 0);
}


size_t pascalParser::ArrayTypeContext::getRuleIndex() const {
  return pascalParser::RuleArrayType;
}

void pascalParser::ArrayTypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterArrayType(this);
}

void pascalParser::ArrayTypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitArrayType(this);
}


antlrcpp::Any pascalParser::ArrayTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitArrayType(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ArrayTypeContext* pascalParser::arrayType() {
  ArrayTypeContext *_localctx = _tracker.createInstance<ArrayTypeContext>(_ctx, getState());
  enterRule(_localctx, 58, pascalParser::RuleArrayType);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(375);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 19, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(361);
      match(pascalParser::ARRAY);
      setState(362);
      match(pascalParser::LBRACK);
      setState(363);
      typeList();
      setState(364);
      match(pascalParser::RBRACK);
      setState(365);
      match(pascalParser::OF);
      setState(366);
      componentType();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(368);
      match(pascalParser::ARRAY);
      setState(369);
      match(pascalParser::LBRACK2);
      setState(370);
      typeList();
      setState(371);
      match(pascalParser::RBRACK2);
      setState(372);
      match(pascalParser::OF);
      setState(373);
      componentType();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TypeListContext ------------------------------------------------------------------

pascalParser::TypeListContext::TypeListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<pascalParser::IndexTypeContext *> pascalParser::TypeListContext::indexType() {
  return getRuleContexts<pascalParser::IndexTypeContext>();
}

pascalParser::IndexTypeContext* pascalParser::TypeListContext::indexType(size_t i) {
  return getRuleContext<pascalParser::IndexTypeContext>(i);
}

std::vector<tree::TerminalNode *> pascalParser::TypeListContext::COMMA() {
  return getTokens(pascalParser::COMMA);
}

tree::TerminalNode* pascalParser::TypeListContext::COMMA(size_t i) {
  return getToken(pascalParser::COMMA, i);
}


size_t pascalParser::TypeListContext::getRuleIndex() const {
  return pascalParser::RuleTypeList;
}

void pascalParser::TypeListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterTypeList(this);
}

void pascalParser::TypeListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitTypeList(this);
}


antlrcpp::Any pascalParser::TypeListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitTypeList(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::TypeListContext* pascalParser::typeList() {
  TypeListContext *_localctx = _tracker.createInstance<TypeListContext>(_ctx, getState());
  enterRule(_localctx, 60, pascalParser::RuleTypeList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(377);
    indexType();
    setState(382);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == pascalParser::COMMA) {
      setState(378);
      match(pascalParser::COMMA);
      setState(379);
      indexType();
      setState(384);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- IndexTypeContext ------------------------------------------------------------------

pascalParser::IndexTypeContext::IndexTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::SimpleTypeContext* pascalParser::IndexTypeContext::simpleType() {
  return getRuleContext<pascalParser::SimpleTypeContext>(0);
}


size_t pascalParser::IndexTypeContext::getRuleIndex() const {
  return pascalParser::RuleIndexType;
}

void pascalParser::IndexTypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterIndexType(this);
}

void pascalParser::IndexTypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitIndexType(this);
}


antlrcpp::Any pascalParser::IndexTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitIndexType(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::IndexTypeContext* pascalParser::indexType() {
  IndexTypeContext *_localctx = _tracker.createInstance<IndexTypeContext>(_ctx, getState());
  enterRule(_localctx, 62, pascalParser::RuleIndexType);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(385);
    simpleType();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ComponentTypeContext ------------------------------------------------------------------

pascalParser::ComponentTypeContext::ComponentTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::Type_Context* pascalParser::ComponentTypeContext::type_() {
  return getRuleContext<pascalParser::Type_Context>(0);
}


size_t pascalParser::ComponentTypeContext::getRuleIndex() const {
  return pascalParser::RuleComponentType;
}

void pascalParser::ComponentTypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterComponentType(this);
}

void pascalParser::ComponentTypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitComponentType(this);
}


antlrcpp::Any pascalParser::ComponentTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitComponentType(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ComponentTypeContext* pascalParser::componentType() {
  ComponentTypeContext *_localctx = _tracker.createInstance<ComponentTypeContext>(_ctx, getState());
  enterRule(_localctx, 64, pascalParser::RuleComponentType);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(387);
    type_();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- RecordTypeContext ------------------------------------------------------------------

pascalParser::RecordTypeContext::RecordTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::RecordTypeContext::RECORD() {
  return getToken(pascalParser::RECORD, 0);
}

tree::TerminalNode* pascalParser::RecordTypeContext::END() {
  return getToken(pascalParser::END, 0);
}

pascalParser::FieldListContext* pascalParser::RecordTypeContext::fieldList() {
  return getRuleContext<pascalParser::FieldListContext>(0);
}


size_t pascalParser::RecordTypeContext::getRuleIndex() const {
  return pascalParser::RuleRecordType;
}

void pascalParser::RecordTypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRecordType(this);
}

void pascalParser::RecordTypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRecordType(this);
}


antlrcpp::Any pascalParser::RecordTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitRecordType(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::RecordTypeContext* pascalParser::recordType() {
  RecordTypeContext *_localctx = _tracker.createInstance<RecordTypeContext>(_ctx, getState());
  enterRule(_localctx, 66, pascalParser::RuleRecordType);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(389);
    match(pascalParser::RECORD);
    setState(391);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == pascalParser::CASE || _la == pascalParser::IDENT) {
      setState(390);
      fieldList();
    }
    setState(393);
    match(pascalParser::END);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FieldListContext ------------------------------------------------------------------

pascalParser::FieldListContext::FieldListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::FixedPartContext* pascalParser::FieldListContext::fixedPart() {
  return getRuleContext<pascalParser::FixedPartContext>(0);
}

tree::TerminalNode* pascalParser::FieldListContext::SEMI() {
  return getToken(pascalParser::SEMI, 0);
}

pascalParser::VariantPartContext* pascalParser::FieldListContext::variantPart() {
  return getRuleContext<pascalParser::VariantPartContext>(0);
}


size_t pascalParser::FieldListContext::getRuleIndex() const {
  return pascalParser::RuleFieldList;
}

void pascalParser::FieldListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFieldList(this);
}

void pascalParser::FieldListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFieldList(this);
}


antlrcpp::Any pascalParser::FieldListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitFieldList(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::FieldListContext* pascalParser::fieldList() {
  FieldListContext *_localctx = _tracker.createInstance<FieldListContext>(_ctx, getState());
  enterRule(_localctx, 68, pascalParser::RuleFieldList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(401);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::IDENT: {
        enterOuterAlt(_localctx, 1);
        setState(395);
        fixedPart();
        setState(398);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if (_la == pascalParser::SEMI) {
          setState(396);
          match(pascalParser::SEMI);
          setState(397);
          variantPart();
        }
        break;
      }

      case pascalParser::CASE: {
        enterOuterAlt(_localctx, 2);
        setState(400);
        variantPart();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FixedPartContext ------------------------------------------------------------------

pascalParser::FixedPartContext::FixedPartContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<pascalParser::RecordSectionContext *> pascalParser::FixedPartContext::recordSection() {
  return getRuleContexts<pascalParser::RecordSectionContext>();
}

pascalParser::RecordSectionContext* pascalParser::FixedPartContext::recordSection(size_t i) {
  return getRuleContext<pascalParser::RecordSectionContext>(i);
}

std::vector<tree::TerminalNode *> pascalParser::FixedPartContext::SEMI() {
  return getTokens(pascalParser::SEMI);
}

tree::TerminalNode* pascalParser::FixedPartContext::SEMI(size_t i) {
  return getToken(pascalParser::SEMI, i);
}


size_t pascalParser::FixedPartContext::getRuleIndex() const {
  return pascalParser::RuleFixedPart;
}

void pascalParser::FixedPartContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFixedPart(this);
}

void pascalParser::FixedPartContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFixedPart(this);
}


antlrcpp::Any pascalParser::FixedPartContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitFixedPart(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::FixedPartContext* pascalParser::fixedPart() {
  FixedPartContext *_localctx = _tracker.createInstance<FixedPartContext>(_ctx, getState());
  enterRule(_localctx, 70, pascalParser::RuleFixedPart);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(403);
    recordSection();
    setState(408);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 24, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(404);
        match(pascalParser::SEMI);
        setState(405);
        recordSection(); 
      }
      setState(410);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 24, _ctx);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- RecordSectionContext ------------------------------------------------------------------

pascalParser::RecordSectionContext::RecordSectionContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::IdentifierListContext* pascalParser::RecordSectionContext::identifierList() {
  return getRuleContext<pascalParser::IdentifierListContext>(0);
}

tree::TerminalNode* pascalParser::RecordSectionContext::COLON() {
  return getToken(pascalParser::COLON, 0);
}

pascalParser::Type_Context* pascalParser::RecordSectionContext::type_() {
  return getRuleContext<pascalParser::Type_Context>(0);
}


size_t pascalParser::RecordSectionContext::getRuleIndex() const {
  return pascalParser::RuleRecordSection;
}

void pascalParser::RecordSectionContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRecordSection(this);
}

void pascalParser::RecordSectionContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRecordSection(this);
}


antlrcpp::Any pascalParser::RecordSectionContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitRecordSection(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::RecordSectionContext* pascalParser::recordSection() {
  RecordSectionContext *_localctx = _tracker.createInstance<RecordSectionContext>(_ctx, getState());
  enterRule(_localctx, 72, pascalParser::RuleRecordSection);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(411);
    identifierList();
    setState(412);
    match(pascalParser::COLON);
    setState(413);
    type_();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- VariantPartContext ------------------------------------------------------------------

pascalParser::VariantPartContext::VariantPartContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::VariantPartContext::CASE() {
  return getToken(pascalParser::CASE, 0);
}

pascalParser::TagContext* pascalParser::VariantPartContext::tag() {
  return getRuleContext<pascalParser::TagContext>(0);
}

tree::TerminalNode* pascalParser::VariantPartContext::OF() {
  return getToken(pascalParser::OF, 0);
}

std::vector<pascalParser::VariantContext *> pascalParser::VariantPartContext::variant() {
  return getRuleContexts<pascalParser::VariantContext>();
}

pascalParser::VariantContext* pascalParser::VariantPartContext::variant(size_t i) {
  return getRuleContext<pascalParser::VariantContext>(i);
}

std::vector<tree::TerminalNode *> pascalParser::VariantPartContext::SEMI() {
  return getTokens(pascalParser::SEMI);
}

tree::TerminalNode* pascalParser::VariantPartContext::SEMI(size_t i) {
  return getToken(pascalParser::SEMI, i);
}


size_t pascalParser::VariantPartContext::getRuleIndex() const {
  return pascalParser::RuleVariantPart;
}

void pascalParser::VariantPartContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVariantPart(this);
}

void pascalParser::VariantPartContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVariantPart(this);
}


antlrcpp::Any pascalParser::VariantPartContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitVariantPart(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::VariantPartContext* pascalParser::variantPart() {
  VariantPartContext *_localctx = _tracker.createInstance<VariantPartContext>(_ctx, getState());
  enterRule(_localctx, 74, pascalParser::RuleVariantPart);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(415);
    match(pascalParser::CASE);
    setState(416);
    tag();
    setState(417);
    match(pascalParser::OF);
    setState(418);
    variant();
    setState(423);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == pascalParser::SEMI) {
      setState(419);
      match(pascalParser::SEMI);
      setState(420);
      variant();
      setState(425);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TagContext ------------------------------------------------------------------

pascalParser::TagContext::TagContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::IdentifierContext* pascalParser::TagContext::identifier() {
  return getRuleContext<pascalParser::IdentifierContext>(0);
}

tree::TerminalNode* pascalParser::TagContext::COLON() {
  return getToken(pascalParser::COLON, 0);
}

pascalParser::TypeIdentifierContext* pascalParser::TagContext::typeIdentifier() {
  return getRuleContext<pascalParser::TypeIdentifierContext>(0);
}


size_t pascalParser::TagContext::getRuleIndex() const {
  return pascalParser::RuleTag;
}

void pascalParser::TagContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterTag(this);
}

void pascalParser::TagContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitTag(this);
}


antlrcpp::Any pascalParser::TagContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitTag(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::TagContext* pascalParser::tag() {
  TagContext *_localctx = _tracker.createInstance<TagContext>(_ctx, getState());
  enterRule(_localctx, 76, pascalParser::RuleTag);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(431);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 26, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(426);
      identifier();
      setState(427);
      match(pascalParser::COLON);
      setState(428);
      typeIdentifier();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(430);
      typeIdentifier();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- VariantContext ------------------------------------------------------------------

pascalParser::VariantContext::VariantContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::ConstListContext* pascalParser::VariantContext::constList() {
  return getRuleContext<pascalParser::ConstListContext>(0);
}

tree::TerminalNode* pascalParser::VariantContext::COLON() {
  return getToken(pascalParser::COLON, 0);
}

tree::TerminalNode* pascalParser::VariantContext::LPAREN() {
  return getToken(pascalParser::LPAREN, 0);
}

pascalParser::FieldListContext* pascalParser::VariantContext::fieldList() {
  return getRuleContext<pascalParser::FieldListContext>(0);
}

tree::TerminalNode* pascalParser::VariantContext::RPAREN() {
  return getToken(pascalParser::RPAREN, 0);
}


size_t pascalParser::VariantContext::getRuleIndex() const {
  return pascalParser::RuleVariant;
}

void pascalParser::VariantContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVariant(this);
}

void pascalParser::VariantContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVariant(this);
}


antlrcpp::Any pascalParser::VariantContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitVariant(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::VariantContext* pascalParser::variant() {
  VariantContext *_localctx = _tracker.createInstance<VariantContext>(_ctx, getState());
  enterRule(_localctx, 78, pascalParser::RuleVariant);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(433);
    constList();
    setState(434);
    match(pascalParser::COLON);
    setState(435);
    match(pascalParser::LPAREN);
    setState(436);
    fieldList();
    setState(437);
    match(pascalParser::RPAREN);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SetTypeContext ------------------------------------------------------------------

pascalParser::SetTypeContext::SetTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::SetTypeContext::SET() {
  return getToken(pascalParser::SET, 0);
}

tree::TerminalNode* pascalParser::SetTypeContext::OF() {
  return getToken(pascalParser::OF, 0);
}

pascalParser::BaseTypeContext* pascalParser::SetTypeContext::baseType() {
  return getRuleContext<pascalParser::BaseTypeContext>(0);
}


size_t pascalParser::SetTypeContext::getRuleIndex() const {
  return pascalParser::RuleSetType;
}

void pascalParser::SetTypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSetType(this);
}

void pascalParser::SetTypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSetType(this);
}


antlrcpp::Any pascalParser::SetTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitSetType(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::SetTypeContext* pascalParser::setType() {
  SetTypeContext *_localctx = _tracker.createInstance<SetTypeContext>(_ctx, getState());
  enterRule(_localctx, 80, pascalParser::RuleSetType);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(439);
    match(pascalParser::SET);
    setState(440);
    match(pascalParser::OF);
    setState(441);
    baseType();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- BaseTypeContext ------------------------------------------------------------------

pascalParser::BaseTypeContext::BaseTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::SimpleTypeContext* pascalParser::BaseTypeContext::simpleType() {
  return getRuleContext<pascalParser::SimpleTypeContext>(0);
}


size_t pascalParser::BaseTypeContext::getRuleIndex() const {
  return pascalParser::RuleBaseType;
}

void pascalParser::BaseTypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterBaseType(this);
}

void pascalParser::BaseTypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitBaseType(this);
}


antlrcpp::Any pascalParser::BaseTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitBaseType(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::BaseTypeContext* pascalParser::baseType() {
  BaseTypeContext *_localctx = _tracker.createInstance<BaseTypeContext>(_ctx, getState());
  enterRule(_localctx, 82, pascalParser::RuleBaseType);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(443);
    simpleType();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FileTypeContext ------------------------------------------------------------------

pascalParser::FileTypeContext::FileTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::FileTypeContext::FILE() {
  return getToken(pascalParser::FILE, 0);
}

tree::TerminalNode* pascalParser::FileTypeContext::OF() {
  return getToken(pascalParser::OF, 0);
}

pascalParser::Type_Context* pascalParser::FileTypeContext::type_() {
  return getRuleContext<pascalParser::Type_Context>(0);
}


size_t pascalParser::FileTypeContext::getRuleIndex() const {
  return pascalParser::RuleFileType;
}

void pascalParser::FileTypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFileType(this);
}

void pascalParser::FileTypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFileType(this);
}


antlrcpp::Any pascalParser::FileTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitFileType(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::FileTypeContext* pascalParser::fileType() {
  FileTypeContext *_localctx = _tracker.createInstance<FileTypeContext>(_ctx, getState());
  enterRule(_localctx, 84, pascalParser::RuleFileType);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(449);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 27, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(445);
      match(pascalParser::FILE);
      setState(446);
      match(pascalParser::OF);
      setState(447);
      type_();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(448);
      match(pascalParser::FILE);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- PointerTypeContext ------------------------------------------------------------------

pascalParser::PointerTypeContext::PointerTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::PointerTypeContext::POINTER() {
  return getToken(pascalParser::POINTER, 0);
}

pascalParser::TypeIdentifierContext* pascalParser::PointerTypeContext::typeIdentifier() {
  return getRuleContext<pascalParser::TypeIdentifierContext>(0);
}


size_t pascalParser::PointerTypeContext::getRuleIndex() const {
  return pascalParser::RulePointerType;
}

void pascalParser::PointerTypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterPointerType(this);
}

void pascalParser::PointerTypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitPointerType(this);
}


antlrcpp::Any pascalParser::PointerTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitPointerType(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::PointerTypeContext* pascalParser::pointerType() {
  PointerTypeContext *_localctx = _tracker.createInstance<PointerTypeContext>(_ctx, getState());
  enterRule(_localctx, 86, pascalParser::RulePointerType);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(451);
    match(pascalParser::POINTER);
    setState(452);
    typeIdentifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- VariableDeclarationPartContext ------------------------------------------------------------------

pascalParser::VariableDeclarationPartContext::VariableDeclarationPartContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::VariableDeclarationPartContext::VAR() {
  return getToken(pascalParser::VAR, 0);
}

std::vector<pascalParser::VariableDeclarationContext *> pascalParser::VariableDeclarationPartContext::variableDeclaration() {
  return getRuleContexts<pascalParser::VariableDeclarationContext>();
}

pascalParser::VariableDeclarationContext* pascalParser::VariableDeclarationPartContext::variableDeclaration(size_t i) {
  return getRuleContext<pascalParser::VariableDeclarationContext>(i);
}

std::vector<tree::TerminalNode *> pascalParser::VariableDeclarationPartContext::SEMI() {
  return getTokens(pascalParser::SEMI);
}

tree::TerminalNode* pascalParser::VariableDeclarationPartContext::SEMI(size_t i) {
  return getToken(pascalParser::SEMI, i);
}


size_t pascalParser::VariableDeclarationPartContext::getRuleIndex() const {
  return pascalParser::RuleVariableDeclarationPart;
}

void pascalParser::VariableDeclarationPartContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVariableDeclarationPart(this);
}

void pascalParser::VariableDeclarationPartContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVariableDeclarationPart(this);
}


antlrcpp::Any pascalParser::VariableDeclarationPartContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitVariableDeclarationPart(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::VariableDeclarationPartContext* pascalParser::variableDeclarationPart() {
  VariableDeclarationPartContext *_localctx = _tracker.createInstance<VariableDeclarationPartContext>(_ctx, getState());
  enterRule(_localctx, 88, pascalParser::RuleVariableDeclarationPart);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(454);
    match(pascalParser::VAR);
    setState(455);
    variableDeclaration();
    setState(460);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 28, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(456);
        match(pascalParser::SEMI);
        setState(457);
        variableDeclaration(); 
      }
      setState(462);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 28, _ctx);
    }
    setState(463);
    match(pascalParser::SEMI);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- VariableDeclarationContext ------------------------------------------------------------------

pascalParser::VariableDeclarationContext::VariableDeclarationContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::IdentifierListContext* pascalParser::VariableDeclarationContext::identifierList() {
  return getRuleContext<pascalParser::IdentifierListContext>(0);
}

tree::TerminalNode* pascalParser::VariableDeclarationContext::COLON() {
  return getToken(pascalParser::COLON, 0);
}

pascalParser::Type_Context* pascalParser::VariableDeclarationContext::type_() {
  return getRuleContext<pascalParser::Type_Context>(0);
}


size_t pascalParser::VariableDeclarationContext::getRuleIndex() const {
  return pascalParser::RuleVariableDeclaration;
}

void pascalParser::VariableDeclarationContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVariableDeclaration(this);
}

void pascalParser::VariableDeclarationContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVariableDeclaration(this);
}


antlrcpp::Any pascalParser::VariableDeclarationContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitVariableDeclaration(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::VariableDeclarationContext* pascalParser::variableDeclaration() {
  VariableDeclarationContext *_localctx = _tracker.createInstance<VariableDeclarationContext>(_ctx, getState());
  enterRule(_localctx, 90, pascalParser::RuleVariableDeclaration);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(465);
    identifierList();
    setState(466);
    match(pascalParser::COLON);
    setState(467);
    type_();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ProcedureAndFunctionDeclarationPartContext ------------------------------------------------------------------

pascalParser::ProcedureAndFunctionDeclarationPartContext::ProcedureAndFunctionDeclarationPartContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::ProcedureOrFunctionDeclarationContext* pascalParser::ProcedureAndFunctionDeclarationPartContext::procedureOrFunctionDeclaration() {
  return getRuleContext<pascalParser::ProcedureOrFunctionDeclarationContext>(0);
}

tree::TerminalNode* pascalParser::ProcedureAndFunctionDeclarationPartContext::SEMI() {
  return getToken(pascalParser::SEMI, 0);
}


size_t pascalParser::ProcedureAndFunctionDeclarationPartContext::getRuleIndex() const {
  return pascalParser::RuleProcedureAndFunctionDeclarationPart;
}

void pascalParser::ProcedureAndFunctionDeclarationPartContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProcedureAndFunctionDeclarationPart(this);
}

void pascalParser::ProcedureAndFunctionDeclarationPartContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProcedureAndFunctionDeclarationPart(this);
}


antlrcpp::Any pascalParser::ProcedureAndFunctionDeclarationPartContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitProcedureAndFunctionDeclarationPart(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ProcedureAndFunctionDeclarationPartContext* pascalParser::procedureAndFunctionDeclarationPart() {
  ProcedureAndFunctionDeclarationPartContext *_localctx = _tracker.createInstance<ProcedureAndFunctionDeclarationPartContext>(_ctx, getState());
  enterRule(_localctx, 92, pascalParser::RuleProcedureAndFunctionDeclarationPart);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(469);
    procedureOrFunctionDeclaration();
    setState(470);
    match(pascalParser::SEMI);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ProcedureOrFunctionDeclarationContext ------------------------------------------------------------------

pascalParser::ProcedureOrFunctionDeclarationContext::ProcedureOrFunctionDeclarationContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::ProcedureDeclarationContext* pascalParser::ProcedureOrFunctionDeclarationContext::procedureDeclaration() {
  return getRuleContext<pascalParser::ProcedureDeclarationContext>(0);
}

pascalParser::FunctionDeclarationContext* pascalParser::ProcedureOrFunctionDeclarationContext::functionDeclaration() {
  return getRuleContext<pascalParser::FunctionDeclarationContext>(0);
}


size_t pascalParser::ProcedureOrFunctionDeclarationContext::getRuleIndex() const {
  return pascalParser::RuleProcedureOrFunctionDeclaration;
}

void pascalParser::ProcedureOrFunctionDeclarationContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProcedureOrFunctionDeclaration(this);
}

void pascalParser::ProcedureOrFunctionDeclarationContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProcedureOrFunctionDeclaration(this);
}


antlrcpp::Any pascalParser::ProcedureOrFunctionDeclarationContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitProcedureOrFunctionDeclaration(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ProcedureOrFunctionDeclarationContext* pascalParser::procedureOrFunctionDeclaration() {
  ProcedureOrFunctionDeclarationContext *_localctx = _tracker.createInstance<ProcedureOrFunctionDeclarationContext>(_ctx, getState());
  enterRule(_localctx, 94, pascalParser::RuleProcedureOrFunctionDeclaration);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(474);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::PROCEDURE: {
        enterOuterAlt(_localctx, 1);
        setState(472);
        procedureDeclaration();
        break;
      }

      case pascalParser::FUNCTION: {
        enterOuterAlt(_localctx, 2);
        setState(473);
        functionDeclaration();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ProcedureDeclarationContext ------------------------------------------------------------------

pascalParser::ProcedureDeclarationContext::ProcedureDeclarationContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::ProcedureDeclarationContext::PROCEDURE() {
  return getToken(pascalParser::PROCEDURE, 0);
}

pascalParser::IdentifierContext* pascalParser::ProcedureDeclarationContext::identifier() {
  return getRuleContext<pascalParser::IdentifierContext>(0);
}

tree::TerminalNode* pascalParser::ProcedureDeclarationContext::SEMI() {
  return getToken(pascalParser::SEMI, 0);
}

pascalParser::BlockContext* pascalParser::ProcedureDeclarationContext::block() {
  return getRuleContext<pascalParser::BlockContext>(0);
}

pascalParser::FormalParameterListContext* pascalParser::ProcedureDeclarationContext::formalParameterList() {
  return getRuleContext<pascalParser::FormalParameterListContext>(0);
}


size_t pascalParser::ProcedureDeclarationContext::getRuleIndex() const {
  return pascalParser::RuleProcedureDeclaration;
}

void pascalParser::ProcedureDeclarationContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProcedureDeclaration(this);
}

void pascalParser::ProcedureDeclarationContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProcedureDeclaration(this);
}


antlrcpp::Any pascalParser::ProcedureDeclarationContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitProcedureDeclaration(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ProcedureDeclarationContext* pascalParser::procedureDeclaration() {
  ProcedureDeclarationContext *_localctx = _tracker.createInstance<ProcedureDeclarationContext>(_ctx, getState());
  enterRule(_localctx, 96, pascalParser::RuleProcedureDeclaration);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(476);
    match(pascalParser::PROCEDURE);
    setState(477);
    identifier();
    setState(479);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == pascalParser::LPAREN) {
      setState(478);
      formalParameterList();
    }
    setState(481);
    match(pascalParser::SEMI);
    setState(482);
    block();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FormalParameterListContext ------------------------------------------------------------------

pascalParser::FormalParameterListContext::FormalParameterListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::FormalParameterListContext::LPAREN() {
  return getToken(pascalParser::LPAREN, 0);
}

std::vector<pascalParser::FormalParameterSectionContext *> pascalParser::FormalParameterListContext::formalParameterSection() {
  return getRuleContexts<pascalParser::FormalParameterSectionContext>();
}

pascalParser::FormalParameterSectionContext* pascalParser::FormalParameterListContext::formalParameterSection(size_t i) {
  return getRuleContext<pascalParser::FormalParameterSectionContext>(i);
}

tree::TerminalNode* pascalParser::FormalParameterListContext::RPAREN() {
  return getToken(pascalParser::RPAREN, 0);
}

std::vector<tree::TerminalNode *> pascalParser::FormalParameterListContext::SEMI() {
  return getTokens(pascalParser::SEMI);
}

tree::TerminalNode* pascalParser::FormalParameterListContext::SEMI(size_t i) {
  return getToken(pascalParser::SEMI, i);
}


size_t pascalParser::FormalParameterListContext::getRuleIndex() const {
  return pascalParser::RuleFormalParameterList;
}

void pascalParser::FormalParameterListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFormalParameterList(this);
}

void pascalParser::FormalParameterListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFormalParameterList(this);
}


antlrcpp::Any pascalParser::FormalParameterListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitFormalParameterList(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::FormalParameterListContext* pascalParser::formalParameterList() {
  FormalParameterListContext *_localctx = _tracker.createInstance<FormalParameterListContext>(_ctx, getState());
  enterRule(_localctx, 98, pascalParser::RuleFormalParameterList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(484);
    match(pascalParser::LPAREN);
    setState(485);
    formalParameterSection();
    setState(490);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == pascalParser::SEMI) {
      setState(486);
      match(pascalParser::SEMI);
      setState(487);
      formalParameterSection();
      setState(492);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(493);
    match(pascalParser::RPAREN);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FormalParameterSectionContext ------------------------------------------------------------------

pascalParser::FormalParameterSectionContext::FormalParameterSectionContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::ParameterGroupContext* pascalParser::FormalParameterSectionContext::parameterGroup() {
  return getRuleContext<pascalParser::ParameterGroupContext>(0);
}

tree::TerminalNode* pascalParser::FormalParameterSectionContext::VAR() {
  return getToken(pascalParser::VAR, 0);
}

tree::TerminalNode* pascalParser::FormalParameterSectionContext::FUNCTION() {
  return getToken(pascalParser::FUNCTION, 0);
}

tree::TerminalNode* pascalParser::FormalParameterSectionContext::PROCEDURE() {
  return getToken(pascalParser::PROCEDURE, 0);
}


size_t pascalParser::FormalParameterSectionContext::getRuleIndex() const {
  return pascalParser::RuleFormalParameterSection;
}

void pascalParser::FormalParameterSectionContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFormalParameterSection(this);
}

void pascalParser::FormalParameterSectionContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFormalParameterSection(this);
}


antlrcpp::Any pascalParser::FormalParameterSectionContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitFormalParameterSection(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::FormalParameterSectionContext* pascalParser::formalParameterSection() {
  FormalParameterSectionContext *_localctx = _tracker.createInstance<FormalParameterSectionContext>(_ctx, getState());
  enterRule(_localctx, 100, pascalParser::RuleFormalParameterSection);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(502);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::IDENT: {
        enterOuterAlt(_localctx, 1);
        setState(495);
        parameterGroup();
        break;
      }

      case pascalParser::VAR: {
        enterOuterAlt(_localctx, 2);
        setState(496);
        match(pascalParser::VAR);
        setState(497);
        parameterGroup();
        break;
      }

      case pascalParser::FUNCTION: {
        enterOuterAlt(_localctx, 3);
        setState(498);
        match(pascalParser::FUNCTION);
        setState(499);
        parameterGroup();
        break;
      }

      case pascalParser::PROCEDURE: {
        enterOuterAlt(_localctx, 4);
        setState(500);
        match(pascalParser::PROCEDURE);
        setState(501);
        parameterGroup();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ParameterGroupContext ------------------------------------------------------------------

pascalParser::ParameterGroupContext::ParameterGroupContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::IdentifierListContext* pascalParser::ParameterGroupContext::identifierList() {
  return getRuleContext<pascalParser::IdentifierListContext>(0);
}

tree::TerminalNode* pascalParser::ParameterGroupContext::COLON() {
  return getToken(pascalParser::COLON, 0);
}

pascalParser::TypeIdentifierContext* pascalParser::ParameterGroupContext::typeIdentifier() {
  return getRuleContext<pascalParser::TypeIdentifierContext>(0);
}


size_t pascalParser::ParameterGroupContext::getRuleIndex() const {
  return pascalParser::RuleParameterGroup;
}

void pascalParser::ParameterGroupContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterParameterGroup(this);
}

void pascalParser::ParameterGroupContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitParameterGroup(this);
}


antlrcpp::Any pascalParser::ParameterGroupContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitParameterGroup(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ParameterGroupContext* pascalParser::parameterGroup() {
  ParameterGroupContext *_localctx = _tracker.createInstance<ParameterGroupContext>(_ctx, getState());
  enterRule(_localctx, 102, pascalParser::RuleParameterGroup);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(504);
    identifierList();
    setState(505);
    match(pascalParser::COLON);
    setState(506);
    typeIdentifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- IdentifierListContext ------------------------------------------------------------------

pascalParser::IdentifierListContext::IdentifierListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<pascalParser::IdentifierContext *> pascalParser::IdentifierListContext::identifier() {
  return getRuleContexts<pascalParser::IdentifierContext>();
}

pascalParser::IdentifierContext* pascalParser::IdentifierListContext::identifier(size_t i) {
  return getRuleContext<pascalParser::IdentifierContext>(i);
}

std::vector<tree::TerminalNode *> pascalParser::IdentifierListContext::COMMA() {
  return getTokens(pascalParser::COMMA);
}

tree::TerminalNode* pascalParser::IdentifierListContext::COMMA(size_t i) {
  return getToken(pascalParser::COMMA, i);
}


size_t pascalParser::IdentifierListContext::getRuleIndex() const {
  return pascalParser::RuleIdentifierList;
}

void pascalParser::IdentifierListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterIdentifierList(this);
}

void pascalParser::IdentifierListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitIdentifierList(this);
}


antlrcpp::Any pascalParser::IdentifierListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitIdentifierList(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::IdentifierListContext* pascalParser::identifierList() {
  IdentifierListContext *_localctx = _tracker.createInstance<IdentifierListContext>(_ctx, getState());
  enterRule(_localctx, 104, pascalParser::RuleIdentifierList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(508);
    identifier();
    setState(513);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == pascalParser::COMMA) {
      setState(509);
      match(pascalParser::COMMA);
      setState(510);
      identifier();
      setState(515);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ConstListContext ------------------------------------------------------------------

pascalParser::ConstListContext::ConstListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<pascalParser::ConstantContext *> pascalParser::ConstListContext::constant() {
  return getRuleContexts<pascalParser::ConstantContext>();
}

pascalParser::ConstantContext* pascalParser::ConstListContext::constant(size_t i) {
  return getRuleContext<pascalParser::ConstantContext>(i);
}

std::vector<tree::TerminalNode *> pascalParser::ConstListContext::COMMA() {
  return getTokens(pascalParser::COMMA);
}

tree::TerminalNode* pascalParser::ConstListContext::COMMA(size_t i) {
  return getToken(pascalParser::COMMA, i);
}


size_t pascalParser::ConstListContext::getRuleIndex() const {
  return pascalParser::RuleConstList;
}

void pascalParser::ConstListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterConstList(this);
}

void pascalParser::ConstListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitConstList(this);
}


antlrcpp::Any pascalParser::ConstListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitConstList(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ConstListContext* pascalParser::constList() {
  ConstListContext *_localctx = _tracker.createInstance<ConstListContext>(_ctx, getState());
  enterRule(_localctx, 106, pascalParser::RuleConstList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(516);
    constant();
    setState(521);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == pascalParser::COMMA) {
      setState(517);
      match(pascalParser::COMMA);
      setState(518);
      constant();
      setState(523);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FunctionDeclarationContext ------------------------------------------------------------------

pascalParser::FunctionDeclarationContext::FunctionDeclarationContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::FunctionDeclarationContext::FUNCTION() {
  return getToken(pascalParser::FUNCTION, 0);
}

pascalParser::IdentifierContext* pascalParser::FunctionDeclarationContext::identifier() {
  return getRuleContext<pascalParser::IdentifierContext>(0);
}

tree::TerminalNode* pascalParser::FunctionDeclarationContext::COLON() {
  return getToken(pascalParser::COLON, 0);
}

pascalParser::ResultTypeContext* pascalParser::FunctionDeclarationContext::resultType() {
  return getRuleContext<pascalParser::ResultTypeContext>(0);
}

tree::TerminalNode* pascalParser::FunctionDeclarationContext::SEMI() {
  return getToken(pascalParser::SEMI, 0);
}

pascalParser::BlockContext* pascalParser::FunctionDeclarationContext::block() {
  return getRuleContext<pascalParser::BlockContext>(0);
}

pascalParser::FormalParameterListContext* pascalParser::FunctionDeclarationContext::formalParameterList() {
  return getRuleContext<pascalParser::FormalParameterListContext>(0);
}


size_t pascalParser::FunctionDeclarationContext::getRuleIndex() const {
  return pascalParser::RuleFunctionDeclaration;
}

void pascalParser::FunctionDeclarationContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFunctionDeclaration(this);
}

void pascalParser::FunctionDeclarationContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFunctionDeclaration(this);
}


antlrcpp::Any pascalParser::FunctionDeclarationContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitFunctionDeclaration(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::FunctionDeclarationContext* pascalParser::functionDeclaration() {
  FunctionDeclarationContext *_localctx = _tracker.createInstance<FunctionDeclarationContext>(_ctx, getState());
  enterRule(_localctx, 108, pascalParser::RuleFunctionDeclaration);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(524);
    match(pascalParser::FUNCTION);
    setState(525);
    identifier();
    setState(527);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == pascalParser::LPAREN) {
      setState(526);
      formalParameterList();
    }
    setState(529);
    match(pascalParser::COLON);
    setState(530);
    resultType();
    setState(531);
    match(pascalParser::SEMI);
    setState(532);
    block();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ResultTypeContext ------------------------------------------------------------------

pascalParser::ResultTypeContext::ResultTypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::TypeIdentifierContext* pascalParser::ResultTypeContext::typeIdentifier() {
  return getRuleContext<pascalParser::TypeIdentifierContext>(0);
}


size_t pascalParser::ResultTypeContext::getRuleIndex() const {
  return pascalParser::RuleResultType;
}

void pascalParser::ResultTypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterResultType(this);
}

void pascalParser::ResultTypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitResultType(this);
}


antlrcpp::Any pascalParser::ResultTypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitResultType(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ResultTypeContext* pascalParser::resultType() {
  ResultTypeContext *_localctx = _tracker.createInstance<ResultTypeContext>(_ctx, getState());
  enterRule(_localctx, 110, pascalParser::RuleResultType);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(534);
    typeIdentifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StatementContext ------------------------------------------------------------------

pascalParser::StatementContext::StatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::LabelContext* pascalParser::StatementContext::label() {
  return getRuleContext<pascalParser::LabelContext>(0);
}

tree::TerminalNode* pascalParser::StatementContext::COLON() {
  return getToken(pascalParser::COLON, 0);
}

pascalParser::UnlabelledStatementContext* pascalParser::StatementContext::unlabelledStatement() {
  return getRuleContext<pascalParser::UnlabelledStatementContext>(0);
}


size_t pascalParser::StatementContext::getRuleIndex() const {
  return pascalParser::RuleStatement;
}

void pascalParser::StatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStatement(this);
}

void pascalParser::StatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStatement(this);
}


antlrcpp::Any pascalParser::StatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitStatement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::StatementContext* pascalParser::statement() {
  StatementContext *_localctx = _tracker.createInstance<StatementContext>(_ctx, getState());
  enterRule(_localctx, 112, pascalParser::RuleStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(541);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::NUM_INT: {
        enterOuterAlt(_localctx, 1);
        setState(536);
        label();
        setState(537);
        match(pascalParser::COLON);
        setState(538);
        unlabelledStatement();
        break;
      }

      case pascalParser::BEGIN:
      case pascalParser::CASE:
      case pascalParser::ELSE:
      case pascalParser::END:
      case pascalParser::FOR:
      case pascalParser::GOTO:
      case pascalParser::IF:
      case pascalParser::REPEAT:
      case pascalParser::UNTIL:
      case pascalParser::WHILE:
      case pascalParser::WITH:
      case pascalParser::SEMI:
      case pascalParser::AT:
      case pascalParser::IDENT: {
        enterOuterAlt(_localctx, 2);
        setState(540);
        unlabelledStatement();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- UnlabelledStatementContext ------------------------------------------------------------------

pascalParser::UnlabelledStatementContext::UnlabelledStatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::SimpleStatementContext* pascalParser::UnlabelledStatementContext::simpleStatement() {
  return getRuleContext<pascalParser::SimpleStatementContext>(0);
}

pascalParser::StructuredStatementContext* pascalParser::UnlabelledStatementContext::structuredStatement() {
  return getRuleContext<pascalParser::StructuredStatementContext>(0);
}


size_t pascalParser::UnlabelledStatementContext::getRuleIndex() const {
  return pascalParser::RuleUnlabelledStatement;
}

void pascalParser::UnlabelledStatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterUnlabelledStatement(this);
}

void pascalParser::UnlabelledStatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitUnlabelledStatement(this);
}


antlrcpp::Any pascalParser::UnlabelledStatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitUnlabelledStatement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::UnlabelledStatementContext* pascalParser::unlabelledStatement() {
  UnlabelledStatementContext *_localctx = _tracker.createInstance<UnlabelledStatementContext>(_ctx, getState());
  enterRule(_localctx, 114, pascalParser::RuleUnlabelledStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(545);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::ELSE:
      case pascalParser::END:
      case pascalParser::GOTO:
      case pascalParser::UNTIL:
      case pascalParser::SEMI:
      case pascalParser::AT:
      case pascalParser::IDENT: {
        enterOuterAlt(_localctx, 1);
        setState(543);
        simpleStatement();
        break;
      }

      case pascalParser::BEGIN:
      case pascalParser::CASE:
      case pascalParser::FOR:
      case pascalParser::IF:
      case pascalParser::REPEAT:
      case pascalParser::WHILE:
      case pascalParser::WITH: {
        enterOuterAlt(_localctx, 2);
        setState(544);
        structuredStatement();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SimpleStatementContext ------------------------------------------------------------------

pascalParser::SimpleStatementContext::SimpleStatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::AssignmentStatementContext* pascalParser::SimpleStatementContext::assignmentStatement() {
  return getRuleContext<pascalParser::AssignmentStatementContext>(0);
}

pascalParser::ProcedureStatementContext* pascalParser::SimpleStatementContext::procedureStatement() {
  return getRuleContext<pascalParser::ProcedureStatementContext>(0);
}

pascalParser::GotoStatementContext* pascalParser::SimpleStatementContext::gotoStatement() {
  return getRuleContext<pascalParser::GotoStatementContext>(0);
}

pascalParser::EmptyStatement_Context* pascalParser::SimpleStatementContext::emptyStatement_() {
  return getRuleContext<pascalParser::EmptyStatement_Context>(0);
}


size_t pascalParser::SimpleStatementContext::getRuleIndex() const {
  return pascalParser::RuleSimpleStatement;
}

void pascalParser::SimpleStatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSimpleStatement(this);
}

void pascalParser::SimpleStatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSimpleStatement(this);
}


antlrcpp::Any pascalParser::SimpleStatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitSimpleStatement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::SimpleStatementContext* pascalParser::simpleStatement() {
  SimpleStatementContext *_localctx = _tracker.createInstance<SimpleStatementContext>(_ctx, getState());
  enterRule(_localctx, 116, pascalParser::RuleSimpleStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(551);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 38, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(547);
      assignmentStatement();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(548);
      procedureStatement();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(549);
      gotoStatement();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(550);
      emptyStatement_();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- AssignmentStatementContext ------------------------------------------------------------------

pascalParser::AssignmentStatementContext::AssignmentStatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::VariableContext* pascalParser::AssignmentStatementContext::variable() {
  return getRuleContext<pascalParser::VariableContext>(0);
}

tree::TerminalNode* pascalParser::AssignmentStatementContext::ASSIGN() {
  return getToken(pascalParser::ASSIGN, 0);
}

pascalParser::ExpressionContext* pascalParser::AssignmentStatementContext::expression() {
  return getRuleContext<pascalParser::ExpressionContext>(0);
}


size_t pascalParser::AssignmentStatementContext::getRuleIndex() const {
  return pascalParser::RuleAssignmentStatement;
}

void pascalParser::AssignmentStatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAssignmentStatement(this);
}

void pascalParser::AssignmentStatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAssignmentStatement(this);
}


antlrcpp::Any pascalParser::AssignmentStatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitAssignmentStatement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::AssignmentStatementContext* pascalParser::assignmentStatement() {
  AssignmentStatementContext *_localctx = _tracker.createInstance<AssignmentStatementContext>(_ctx, getState());
  enterRule(_localctx, 118, pascalParser::RuleAssignmentStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(553);
    variable();
    setState(554);
    match(pascalParser::ASSIGN);
    setState(555);
    expression();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- VariableContext ------------------------------------------------------------------

pascalParser::VariableContext::VariableContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::VariableContext::AT() {
  return getToken(pascalParser::AT, 0);
}

std::vector<pascalParser::IdentifierContext *> pascalParser::VariableContext::identifier() {
  return getRuleContexts<pascalParser::IdentifierContext>();
}

pascalParser::IdentifierContext* pascalParser::VariableContext::identifier(size_t i) {
  return getRuleContext<pascalParser::IdentifierContext>(i);
}

std::vector<tree::TerminalNode *> pascalParser::VariableContext::LBRACK() {
  return getTokens(pascalParser::LBRACK);
}

tree::TerminalNode* pascalParser::VariableContext::LBRACK(size_t i) {
  return getToken(pascalParser::LBRACK, i);
}

std::vector<pascalParser::ExpressionContext *> pascalParser::VariableContext::expression() {
  return getRuleContexts<pascalParser::ExpressionContext>();
}

pascalParser::ExpressionContext* pascalParser::VariableContext::expression(size_t i) {
  return getRuleContext<pascalParser::ExpressionContext>(i);
}

std::vector<tree::TerminalNode *> pascalParser::VariableContext::RBRACK() {
  return getTokens(pascalParser::RBRACK);
}

tree::TerminalNode* pascalParser::VariableContext::RBRACK(size_t i) {
  return getToken(pascalParser::RBRACK, i);
}

std::vector<tree::TerminalNode *> pascalParser::VariableContext::LBRACK2() {
  return getTokens(pascalParser::LBRACK2);
}

tree::TerminalNode* pascalParser::VariableContext::LBRACK2(size_t i) {
  return getToken(pascalParser::LBRACK2, i);
}

std::vector<tree::TerminalNode *> pascalParser::VariableContext::RBRACK2() {
  return getTokens(pascalParser::RBRACK2);
}

tree::TerminalNode* pascalParser::VariableContext::RBRACK2(size_t i) {
  return getToken(pascalParser::RBRACK2, i);
}

std::vector<tree::TerminalNode *> pascalParser::VariableContext::DOT() {
  return getTokens(pascalParser::DOT);
}

tree::TerminalNode* pascalParser::VariableContext::DOT(size_t i) {
  return getToken(pascalParser::DOT, i);
}

std::vector<tree::TerminalNode *> pascalParser::VariableContext::POINTER() {
  return getTokens(pascalParser::POINTER);
}

tree::TerminalNode* pascalParser::VariableContext::POINTER(size_t i) {
  return getToken(pascalParser::POINTER, i);
}

std::vector<tree::TerminalNode *> pascalParser::VariableContext::COMMA() {
  return getTokens(pascalParser::COMMA);
}

tree::TerminalNode* pascalParser::VariableContext::COMMA(size_t i) {
  return getToken(pascalParser::COMMA, i);
}


size_t pascalParser::VariableContext::getRuleIndex() const {
  return pascalParser::RuleVariable;
}

void pascalParser::VariableContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVariable(this);
}

void pascalParser::VariableContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVariable(this);
}


antlrcpp::Any pascalParser::VariableContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitVariable(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::VariableContext* pascalParser::variable() {
  VariableContext *_localctx = _tracker.createInstance<VariableContext>(_ctx, getState());
  enterRule(_localctx, 120, pascalParser::RuleVariable);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(560);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::AT: {
        setState(557);
        match(pascalParser::AT);
        setState(558);
        identifier();
        break;
      }

      case pascalParser::IDENT: {
        setState(559);
        identifier();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
    setState(589);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & ((1ULL << pascalParser::LBRACK)
      | (1ULL << pascalParser::LBRACK2)
      | (1ULL << pascalParser::POINTER)
      | (1ULL << pascalParser::DOT))) != 0)) {
      setState(587);
      _errHandler->sync(this);
      switch (_input->LA(1)) {
        case pascalParser::LBRACK: {
          setState(562);
          match(pascalParser::LBRACK);
          setState(563);
          expression();
          setState(568);
          _errHandler->sync(this);
          _la = _input->LA(1);
          while (_la == pascalParser::COMMA) {
            setState(564);
            match(pascalParser::COMMA);
            setState(565);
            expression();
            setState(570);
            _errHandler->sync(this);
            _la = _input->LA(1);
          }
          setState(571);
          match(pascalParser::RBRACK);
          break;
        }

        case pascalParser::LBRACK2: {
          setState(573);
          match(pascalParser::LBRACK2);
          setState(574);
          expression();
          setState(579);
          _errHandler->sync(this);
          _la = _input->LA(1);
          while (_la == pascalParser::COMMA) {
            setState(575);
            match(pascalParser::COMMA);
            setState(576);
            expression();
            setState(581);
            _errHandler->sync(this);
            _la = _input->LA(1);
          }
          setState(582);
          match(pascalParser::RBRACK2);
          break;
        }

        case pascalParser::DOT: {
          setState(584);
          match(pascalParser::DOT);
          setState(585);
          identifier();
          break;
        }

        case pascalParser::POINTER: {
          setState(586);
          match(pascalParser::POINTER);
          break;
        }

      default:
        throw NoViableAltException(this);
      }
      setState(591);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ExpressionContext ------------------------------------------------------------------

pascalParser::ExpressionContext::ExpressionContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::SimpleExpressionContext* pascalParser::ExpressionContext::simpleExpression() {
  return getRuleContext<pascalParser::SimpleExpressionContext>(0);
}

pascalParser::RelationaloperatorContext* pascalParser::ExpressionContext::relationaloperator() {
  return getRuleContext<pascalParser::RelationaloperatorContext>(0);
}

pascalParser::ExpressionContext* pascalParser::ExpressionContext::expression() {
  return getRuleContext<pascalParser::ExpressionContext>(0);
}


size_t pascalParser::ExpressionContext::getRuleIndex() const {
  return pascalParser::RuleExpression;
}

void pascalParser::ExpressionContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterExpression(this);
}

void pascalParser::ExpressionContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitExpression(this);
}


antlrcpp::Any pascalParser::ExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitExpression(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ExpressionContext* pascalParser::expression() {
  ExpressionContext *_localctx = _tracker.createInstance<ExpressionContext>(_ctx, getState());
  enterRule(_localctx, 122, pascalParser::RuleExpression);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(592);
    simpleExpression();
    setState(596);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & ((1ULL << pascalParser::IN)
      | (1ULL << pascalParser::EQUAL)
      | (1ULL << pascalParser::NOT_EQUAL)
      | (1ULL << pascalParser::LT)
      | (1ULL << pascalParser::LE)
      | (1ULL << pascalParser::GE)
      | (1ULL << pascalParser::GT))) != 0)) {
      setState(593);
      relationaloperator();
      setState(594);
      expression();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- RelationaloperatorContext ------------------------------------------------------------------

pascalParser::RelationaloperatorContext::RelationaloperatorContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::RelationaloperatorContext::EQUAL() {
  return getToken(pascalParser::EQUAL, 0);
}

tree::TerminalNode* pascalParser::RelationaloperatorContext::NOT_EQUAL() {
  return getToken(pascalParser::NOT_EQUAL, 0);
}

tree::TerminalNode* pascalParser::RelationaloperatorContext::LT() {
  return getToken(pascalParser::LT, 0);
}

tree::TerminalNode* pascalParser::RelationaloperatorContext::LE() {
  return getToken(pascalParser::LE, 0);
}

tree::TerminalNode* pascalParser::RelationaloperatorContext::GE() {
  return getToken(pascalParser::GE, 0);
}

tree::TerminalNode* pascalParser::RelationaloperatorContext::GT() {
  return getToken(pascalParser::GT, 0);
}

tree::TerminalNode* pascalParser::RelationaloperatorContext::IN() {
  return getToken(pascalParser::IN, 0);
}


size_t pascalParser::RelationaloperatorContext::getRuleIndex() const {
  return pascalParser::RuleRelationaloperator;
}

void pascalParser::RelationaloperatorContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRelationaloperator(this);
}

void pascalParser::RelationaloperatorContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRelationaloperator(this);
}


antlrcpp::Any pascalParser::RelationaloperatorContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitRelationaloperator(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::RelationaloperatorContext* pascalParser::relationaloperator() {
  RelationaloperatorContext *_localctx = _tracker.createInstance<RelationaloperatorContext>(_ctx, getState());
  enterRule(_localctx, 124, pascalParser::RuleRelationaloperator);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(598);
    _la = _input->LA(1);
    if (!((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & ((1ULL << pascalParser::IN)
      | (1ULL << pascalParser::EQUAL)
      | (1ULL << pascalParser::NOT_EQUAL)
      | (1ULL << pascalParser::LT)
      | (1ULL << pascalParser::LE)
      | (1ULL << pascalParser::GE)
      | (1ULL << pascalParser::GT))) != 0))) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SimpleExpressionContext ------------------------------------------------------------------

pascalParser::SimpleExpressionContext::SimpleExpressionContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::TermContext* pascalParser::SimpleExpressionContext::term() {
  return getRuleContext<pascalParser::TermContext>(0);
}

pascalParser::AdditiveoperatorContext* pascalParser::SimpleExpressionContext::additiveoperator() {
  return getRuleContext<pascalParser::AdditiveoperatorContext>(0);
}

pascalParser::SimpleExpressionContext* pascalParser::SimpleExpressionContext::simpleExpression() {
  return getRuleContext<pascalParser::SimpleExpressionContext>(0);
}


size_t pascalParser::SimpleExpressionContext::getRuleIndex() const {
  return pascalParser::RuleSimpleExpression;
}

void pascalParser::SimpleExpressionContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSimpleExpression(this);
}

void pascalParser::SimpleExpressionContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSimpleExpression(this);
}


antlrcpp::Any pascalParser::SimpleExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitSimpleExpression(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::SimpleExpressionContext* pascalParser::simpleExpression() {
  SimpleExpressionContext *_localctx = _tracker.createInstance<SimpleExpressionContext>(_ctx, getState());
  enterRule(_localctx, 126, pascalParser::RuleSimpleExpression);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(600);
    term();
    setState(604);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & ((1ULL << pascalParser::OR)
      | (1ULL << pascalParser::PLUS)
      | (1ULL << pascalParser::MINUS))) != 0)) {
      setState(601);
      additiveoperator();
      setState(602);
      simpleExpression();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- AdditiveoperatorContext ------------------------------------------------------------------

pascalParser::AdditiveoperatorContext::AdditiveoperatorContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::AdditiveoperatorContext::PLUS() {
  return getToken(pascalParser::PLUS, 0);
}

tree::TerminalNode* pascalParser::AdditiveoperatorContext::MINUS() {
  return getToken(pascalParser::MINUS, 0);
}

tree::TerminalNode* pascalParser::AdditiveoperatorContext::OR() {
  return getToken(pascalParser::OR, 0);
}


size_t pascalParser::AdditiveoperatorContext::getRuleIndex() const {
  return pascalParser::RuleAdditiveoperator;
}

void pascalParser::AdditiveoperatorContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAdditiveoperator(this);
}

void pascalParser::AdditiveoperatorContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAdditiveoperator(this);
}


antlrcpp::Any pascalParser::AdditiveoperatorContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitAdditiveoperator(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::AdditiveoperatorContext* pascalParser::additiveoperator() {
  AdditiveoperatorContext *_localctx = _tracker.createInstance<AdditiveoperatorContext>(_ctx, getState());
  enterRule(_localctx, 128, pascalParser::RuleAdditiveoperator);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(606);
    _la = _input->LA(1);
    if (!((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & ((1ULL << pascalParser::OR)
      | (1ULL << pascalParser::PLUS)
      | (1ULL << pascalParser::MINUS))) != 0))) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TermContext ------------------------------------------------------------------

pascalParser::TermContext::TermContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::SignedFactorContext* pascalParser::TermContext::signedFactor() {
  return getRuleContext<pascalParser::SignedFactorContext>(0);
}

pascalParser::MultiplicativeoperatorContext* pascalParser::TermContext::multiplicativeoperator() {
  return getRuleContext<pascalParser::MultiplicativeoperatorContext>(0);
}

pascalParser::TermContext* pascalParser::TermContext::term() {
  return getRuleContext<pascalParser::TermContext>(0);
}


size_t pascalParser::TermContext::getRuleIndex() const {
  return pascalParser::RuleTerm;
}

void pascalParser::TermContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterTerm(this);
}

void pascalParser::TermContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitTerm(this);
}


antlrcpp::Any pascalParser::TermContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitTerm(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::TermContext* pascalParser::term() {
  TermContext *_localctx = _tracker.createInstance<TermContext>(_ctx, getState());
  enterRule(_localctx, 130, pascalParser::RuleTerm);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(608);
    signedFactor();
    setState(612);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & ((1ULL << pascalParser::AND)
      | (1ULL << pascalParser::DIV)
      | (1ULL << pascalParser::MOD)
      | (1ULL << pascalParser::STAR)
      | (1ULL << pascalParser::SLASH))) != 0)) {
      setState(609);
      multiplicativeoperator();
      setState(610);
      term();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- MultiplicativeoperatorContext ------------------------------------------------------------------

pascalParser::MultiplicativeoperatorContext::MultiplicativeoperatorContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::MultiplicativeoperatorContext::STAR() {
  return getToken(pascalParser::STAR, 0);
}

tree::TerminalNode* pascalParser::MultiplicativeoperatorContext::SLASH() {
  return getToken(pascalParser::SLASH, 0);
}

tree::TerminalNode* pascalParser::MultiplicativeoperatorContext::DIV() {
  return getToken(pascalParser::DIV, 0);
}

tree::TerminalNode* pascalParser::MultiplicativeoperatorContext::MOD() {
  return getToken(pascalParser::MOD, 0);
}

tree::TerminalNode* pascalParser::MultiplicativeoperatorContext::AND() {
  return getToken(pascalParser::AND, 0);
}


size_t pascalParser::MultiplicativeoperatorContext::getRuleIndex() const {
  return pascalParser::RuleMultiplicativeoperator;
}

void pascalParser::MultiplicativeoperatorContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterMultiplicativeoperator(this);
}

void pascalParser::MultiplicativeoperatorContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitMultiplicativeoperator(this);
}


antlrcpp::Any pascalParser::MultiplicativeoperatorContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitMultiplicativeoperator(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::MultiplicativeoperatorContext* pascalParser::multiplicativeoperator() {
  MultiplicativeoperatorContext *_localctx = _tracker.createInstance<MultiplicativeoperatorContext>(_ctx, getState());
  enterRule(_localctx, 132, pascalParser::RuleMultiplicativeoperator);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(614);
    _la = _input->LA(1);
    if (!((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & ((1ULL << pascalParser::AND)
      | (1ULL << pascalParser::DIV)
      | (1ULL << pascalParser::MOD)
      | (1ULL << pascalParser::STAR)
      | (1ULL << pascalParser::SLASH))) != 0))) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SignedFactorContext ------------------------------------------------------------------

pascalParser::SignedFactorContext::SignedFactorContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::FactorContext* pascalParser::SignedFactorContext::factor() {
  return getRuleContext<pascalParser::FactorContext>(0);
}

tree::TerminalNode* pascalParser::SignedFactorContext::PLUS() {
  return getToken(pascalParser::PLUS, 0);
}

tree::TerminalNode* pascalParser::SignedFactorContext::MINUS() {
  return getToken(pascalParser::MINUS, 0);
}


size_t pascalParser::SignedFactorContext::getRuleIndex() const {
  return pascalParser::RuleSignedFactor;
}

void pascalParser::SignedFactorContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSignedFactor(this);
}

void pascalParser::SignedFactorContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSignedFactor(this);
}


antlrcpp::Any pascalParser::SignedFactorContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitSignedFactor(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::SignedFactorContext* pascalParser::signedFactor() {
  SignedFactorContext *_localctx = _tracker.createInstance<SignedFactorContext>(_ctx, getState());
  enterRule(_localctx, 134, pascalParser::RuleSignedFactor);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(617);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == pascalParser::PLUS

    || _la == pascalParser::MINUS) {
      setState(616);
      _la = _input->LA(1);
      if (!(_la == pascalParser::PLUS

      || _la == pascalParser::MINUS)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
    }
    setState(619);
    factor();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FactorContext ------------------------------------------------------------------

pascalParser::FactorContext::FactorContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::VariableContext* pascalParser::FactorContext::variable() {
  return getRuleContext<pascalParser::VariableContext>(0);
}

tree::TerminalNode* pascalParser::FactorContext::LPAREN() {
  return getToken(pascalParser::LPAREN, 0);
}

pascalParser::ExpressionContext* pascalParser::FactorContext::expression() {
  return getRuleContext<pascalParser::ExpressionContext>(0);
}

tree::TerminalNode* pascalParser::FactorContext::RPAREN() {
  return getToken(pascalParser::RPAREN, 0);
}

pascalParser::FunctionDesignatorContext* pascalParser::FactorContext::functionDesignator() {
  return getRuleContext<pascalParser::FunctionDesignatorContext>(0);
}

pascalParser::UnsignedConstantContext* pascalParser::FactorContext::unsignedConstant() {
  return getRuleContext<pascalParser::UnsignedConstantContext>(0);
}

pascalParser::Set_Context* pascalParser::FactorContext::set_() {
  return getRuleContext<pascalParser::Set_Context>(0);
}

tree::TerminalNode* pascalParser::FactorContext::NOT() {
  return getToken(pascalParser::NOT, 0);
}

pascalParser::FactorContext* pascalParser::FactorContext::factor() {
  return getRuleContext<pascalParser::FactorContext>(0);
}

pascalParser::Bool_Context* pascalParser::FactorContext::bool_() {
  return getRuleContext<pascalParser::Bool_Context>(0);
}


size_t pascalParser::FactorContext::getRuleIndex() const {
  return pascalParser::RuleFactor;
}

void pascalParser::FactorContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFactor(this);
}

void pascalParser::FactorContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFactor(this);
}


antlrcpp::Any pascalParser::FactorContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitFactor(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::FactorContext* pascalParser::factor() {
  FactorContext *_localctx = _tracker.createInstance<FactorContext>(_ctx, getState());
  enterRule(_localctx, 136, pascalParser::RuleFactor);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(632);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 48, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(621);
      variable();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(622);
      match(pascalParser::LPAREN);
      setState(623);
      expression();
      setState(624);
      match(pascalParser::RPAREN);
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(626);
      functionDesignator();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(627);
      unsignedConstant();
      break;
    }

    case 5: {
      enterOuterAlt(_localctx, 5);
      setState(628);
      set_();
      break;
    }

    case 6: {
      enterOuterAlt(_localctx, 6);
      setState(629);
      match(pascalParser::NOT);
      setState(630);
      factor();
      break;
    }

    case 7: {
      enterOuterAlt(_localctx, 7);
      setState(631);
      bool_();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- UnsignedConstantContext ------------------------------------------------------------------

pascalParser::UnsignedConstantContext::UnsignedConstantContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::UnsignedNumberContext* pascalParser::UnsignedConstantContext::unsignedNumber() {
  return getRuleContext<pascalParser::UnsignedNumberContext>(0);
}

pascalParser::ConstantChrContext* pascalParser::UnsignedConstantContext::constantChr() {
  return getRuleContext<pascalParser::ConstantChrContext>(0);
}

pascalParser::StringContext* pascalParser::UnsignedConstantContext::string() {
  return getRuleContext<pascalParser::StringContext>(0);
}

tree::TerminalNode* pascalParser::UnsignedConstantContext::NIL() {
  return getToken(pascalParser::NIL, 0);
}


size_t pascalParser::UnsignedConstantContext::getRuleIndex() const {
  return pascalParser::RuleUnsignedConstant;
}

void pascalParser::UnsignedConstantContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterUnsignedConstant(this);
}

void pascalParser::UnsignedConstantContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitUnsignedConstant(this);
}


antlrcpp::Any pascalParser::UnsignedConstantContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitUnsignedConstant(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::UnsignedConstantContext* pascalParser::unsignedConstant() {
  UnsignedConstantContext *_localctx = _tracker.createInstance<UnsignedConstantContext>(_ctx, getState());
  enterRule(_localctx, 138, pascalParser::RuleUnsignedConstant);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(638);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::NUM_INT:
      case pascalParser::NUM_REAL: {
        enterOuterAlt(_localctx, 1);
        setState(634);
        unsignedNumber();
        break;
      }

      case pascalParser::CHR: {
        enterOuterAlt(_localctx, 2);
        setState(635);
        constantChr();
        break;
      }

      case pascalParser::STRING_LITERAL: {
        enterOuterAlt(_localctx, 3);
        setState(636);
        string();
        break;
      }

      case pascalParser::NIL: {
        enterOuterAlt(_localctx, 4);
        setState(637);
        match(pascalParser::NIL);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FunctionDesignatorContext ------------------------------------------------------------------

pascalParser::FunctionDesignatorContext::FunctionDesignatorContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::IdentifierContext* pascalParser::FunctionDesignatorContext::identifier() {
  return getRuleContext<pascalParser::IdentifierContext>(0);
}

tree::TerminalNode* pascalParser::FunctionDesignatorContext::LPAREN() {
  return getToken(pascalParser::LPAREN, 0);
}

pascalParser::ParameterListContext* pascalParser::FunctionDesignatorContext::parameterList() {
  return getRuleContext<pascalParser::ParameterListContext>(0);
}

tree::TerminalNode* pascalParser::FunctionDesignatorContext::RPAREN() {
  return getToken(pascalParser::RPAREN, 0);
}


size_t pascalParser::FunctionDesignatorContext::getRuleIndex() const {
  return pascalParser::RuleFunctionDesignator;
}

void pascalParser::FunctionDesignatorContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFunctionDesignator(this);
}

void pascalParser::FunctionDesignatorContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFunctionDesignator(this);
}


antlrcpp::Any pascalParser::FunctionDesignatorContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitFunctionDesignator(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::FunctionDesignatorContext* pascalParser::functionDesignator() {
  FunctionDesignatorContext *_localctx = _tracker.createInstance<FunctionDesignatorContext>(_ctx, getState());
  enterRule(_localctx, 140, pascalParser::RuleFunctionDesignator);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(640);
    identifier();
    setState(641);
    match(pascalParser::LPAREN);
    setState(642);
    parameterList();
    setState(643);
    match(pascalParser::RPAREN);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ParameterListContext ------------------------------------------------------------------

pascalParser::ParameterListContext::ParameterListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<pascalParser::ActualParameterContext *> pascalParser::ParameterListContext::actualParameter() {
  return getRuleContexts<pascalParser::ActualParameterContext>();
}

pascalParser::ActualParameterContext* pascalParser::ParameterListContext::actualParameter(size_t i) {
  return getRuleContext<pascalParser::ActualParameterContext>(i);
}

std::vector<tree::TerminalNode *> pascalParser::ParameterListContext::COMMA() {
  return getTokens(pascalParser::COMMA);
}

tree::TerminalNode* pascalParser::ParameterListContext::COMMA(size_t i) {
  return getToken(pascalParser::COMMA, i);
}


size_t pascalParser::ParameterListContext::getRuleIndex() const {
  return pascalParser::RuleParameterList;
}

void pascalParser::ParameterListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterParameterList(this);
}

void pascalParser::ParameterListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitParameterList(this);
}


antlrcpp::Any pascalParser::ParameterListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitParameterList(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ParameterListContext* pascalParser::parameterList() {
  ParameterListContext *_localctx = _tracker.createInstance<ParameterListContext>(_ctx, getState());
  enterRule(_localctx, 142, pascalParser::RuleParameterList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(645);
    actualParameter();
    setState(650);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == pascalParser::COMMA) {
      setState(646);
      match(pascalParser::COMMA);
      setState(647);
      actualParameter();
      setState(652);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Set_Context ------------------------------------------------------------------

pascalParser::Set_Context::Set_Context(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::Set_Context::LBRACK() {
  return getToken(pascalParser::LBRACK, 0);
}

pascalParser::ElementListContext* pascalParser::Set_Context::elementList() {
  return getRuleContext<pascalParser::ElementListContext>(0);
}

tree::TerminalNode* pascalParser::Set_Context::RBRACK() {
  return getToken(pascalParser::RBRACK, 0);
}

tree::TerminalNode* pascalParser::Set_Context::LBRACK2() {
  return getToken(pascalParser::LBRACK2, 0);
}

tree::TerminalNode* pascalParser::Set_Context::RBRACK2() {
  return getToken(pascalParser::RBRACK2, 0);
}


size_t pascalParser::Set_Context::getRuleIndex() const {
  return pascalParser::RuleSet_;
}

void pascalParser::Set_Context::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSet_(this);
}

void pascalParser::Set_Context::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSet_(this);
}


antlrcpp::Any pascalParser::Set_Context::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitSet_(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::Set_Context* pascalParser::set_() {
  Set_Context *_localctx = _tracker.createInstance<Set_Context>(_ctx, getState());
  enterRule(_localctx, 144, pascalParser::RuleSet_);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(661);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::LBRACK: {
        enterOuterAlt(_localctx, 1);
        setState(653);
        match(pascalParser::LBRACK);
        setState(654);
        elementList();
        setState(655);
        match(pascalParser::RBRACK);
        break;
      }

      case pascalParser::LBRACK2: {
        enterOuterAlt(_localctx, 2);
        setState(657);
        match(pascalParser::LBRACK2);
        setState(658);
        elementList();
        setState(659);
        match(pascalParser::RBRACK2);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ElementListContext ------------------------------------------------------------------

pascalParser::ElementListContext::ElementListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<pascalParser::ElementContext *> pascalParser::ElementListContext::element() {
  return getRuleContexts<pascalParser::ElementContext>();
}

pascalParser::ElementContext* pascalParser::ElementListContext::element(size_t i) {
  return getRuleContext<pascalParser::ElementContext>(i);
}

std::vector<tree::TerminalNode *> pascalParser::ElementListContext::COMMA() {
  return getTokens(pascalParser::COMMA);
}

tree::TerminalNode* pascalParser::ElementListContext::COMMA(size_t i) {
  return getToken(pascalParser::COMMA, i);
}


size_t pascalParser::ElementListContext::getRuleIndex() const {
  return pascalParser::RuleElementList;
}

void pascalParser::ElementListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterElementList(this);
}

void pascalParser::ElementListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitElementList(this);
}


antlrcpp::Any pascalParser::ElementListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitElementList(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ElementListContext* pascalParser::elementList() {
  ElementListContext *_localctx = _tracker.createInstance<ElementListContext>(_ctx, getState());
  enterRule(_localctx, 146, pascalParser::RuleElementList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(672);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::CHR:
      case pascalParser::NIL:
      case pascalParser::NOT:
      case pascalParser::PLUS:
      case pascalParser::MINUS:
      case pascalParser::LPAREN:
      case pascalParser::LBRACK:
      case pascalParser::LBRACK2:
      case pascalParser::AT:
      case pascalParser::TRUE:
      case pascalParser::FALSE:
      case pascalParser::IDENT:
      case pascalParser::STRING_LITERAL:
      case pascalParser::NUM_INT:
      case pascalParser::NUM_REAL: {
        enterOuterAlt(_localctx, 1);
        setState(663);
        element();
        setState(668);
        _errHandler->sync(this);
        _la = _input->LA(1);
        while (_la == pascalParser::COMMA) {
          setState(664);
          match(pascalParser::COMMA);
          setState(665);
          element();
          setState(670);
          _errHandler->sync(this);
          _la = _input->LA(1);
        }
        break;
      }

      case pascalParser::RBRACK:
      case pascalParser::RBRACK2: {
        enterOuterAlt(_localctx, 2);

        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ElementContext ------------------------------------------------------------------

pascalParser::ElementContext::ElementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<pascalParser::ExpressionContext *> pascalParser::ElementContext::expression() {
  return getRuleContexts<pascalParser::ExpressionContext>();
}

pascalParser::ExpressionContext* pascalParser::ElementContext::expression(size_t i) {
  return getRuleContext<pascalParser::ExpressionContext>(i);
}

tree::TerminalNode* pascalParser::ElementContext::DOTDOT() {
  return getToken(pascalParser::DOTDOT, 0);
}


size_t pascalParser::ElementContext::getRuleIndex() const {
  return pascalParser::RuleElement;
}

void pascalParser::ElementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterElement(this);
}

void pascalParser::ElementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitElement(this);
}


antlrcpp::Any pascalParser::ElementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitElement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ElementContext* pascalParser::element() {
  ElementContext *_localctx = _tracker.createInstance<ElementContext>(_ctx, getState());
  enterRule(_localctx, 148, pascalParser::RuleElement);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(674);
    expression();
    setState(677);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == pascalParser::DOTDOT) {
      setState(675);
      match(pascalParser::DOTDOT);
      setState(676);
      expression();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ProcedureStatementContext ------------------------------------------------------------------

pascalParser::ProcedureStatementContext::ProcedureStatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::IdentifierContext* pascalParser::ProcedureStatementContext::identifier() {
  return getRuleContext<pascalParser::IdentifierContext>(0);
}

tree::TerminalNode* pascalParser::ProcedureStatementContext::LPAREN() {
  return getToken(pascalParser::LPAREN, 0);
}

pascalParser::ParameterListContext* pascalParser::ProcedureStatementContext::parameterList() {
  return getRuleContext<pascalParser::ParameterListContext>(0);
}

tree::TerminalNode* pascalParser::ProcedureStatementContext::RPAREN() {
  return getToken(pascalParser::RPAREN, 0);
}


size_t pascalParser::ProcedureStatementContext::getRuleIndex() const {
  return pascalParser::RuleProcedureStatement;
}

void pascalParser::ProcedureStatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProcedureStatement(this);
}

void pascalParser::ProcedureStatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProcedureStatement(this);
}


antlrcpp::Any pascalParser::ProcedureStatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitProcedureStatement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ProcedureStatementContext* pascalParser::procedureStatement() {
  ProcedureStatementContext *_localctx = _tracker.createInstance<ProcedureStatementContext>(_ctx, getState());
  enterRule(_localctx, 150, pascalParser::RuleProcedureStatement);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(679);
    identifier();
    setState(684);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == pascalParser::LPAREN) {
      setState(680);
      match(pascalParser::LPAREN);
      setState(681);
      parameterList();
      setState(682);
      match(pascalParser::RPAREN);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ActualParameterContext ------------------------------------------------------------------

pascalParser::ActualParameterContext::ActualParameterContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::ExpressionContext* pascalParser::ActualParameterContext::expression() {
  return getRuleContext<pascalParser::ExpressionContext>(0);
}

std::vector<pascalParser::ParameterwidthContext *> pascalParser::ActualParameterContext::parameterwidth() {
  return getRuleContexts<pascalParser::ParameterwidthContext>();
}

pascalParser::ParameterwidthContext* pascalParser::ActualParameterContext::parameterwidth(size_t i) {
  return getRuleContext<pascalParser::ParameterwidthContext>(i);
}


size_t pascalParser::ActualParameterContext::getRuleIndex() const {
  return pascalParser::RuleActualParameter;
}

void pascalParser::ActualParameterContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterActualParameter(this);
}

void pascalParser::ActualParameterContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitActualParameter(this);
}


antlrcpp::Any pascalParser::ActualParameterContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitActualParameter(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ActualParameterContext* pascalParser::actualParameter() {
  ActualParameterContext *_localctx = _tracker.createInstance<ActualParameterContext>(_ctx, getState());
  enterRule(_localctx, 152, pascalParser::RuleActualParameter);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(686);
    expression();
    setState(690);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == pascalParser::COLON) {
      setState(687);
      parameterwidth();
      setState(692);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ParameterwidthContext ------------------------------------------------------------------

pascalParser::ParameterwidthContext::ParameterwidthContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::ParameterwidthContext::COLON() {
  return getToken(pascalParser::COLON, 0);
}

pascalParser::ExpressionContext* pascalParser::ParameterwidthContext::expression() {
  return getRuleContext<pascalParser::ExpressionContext>(0);
}


size_t pascalParser::ParameterwidthContext::getRuleIndex() const {
  return pascalParser::RuleParameterwidth;
}

void pascalParser::ParameterwidthContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterParameterwidth(this);
}

void pascalParser::ParameterwidthContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitParameterwidth(this);
}


antlrcpp::Any pascalParser::ParameterwidthContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitParameterwidth(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ParameterwidthContext* pascalParser::parameterwidth() {
  ParameterwidthContext *_localctx = _tracker.createInstance<ParameterwidthContext>(_ctx, getState());
  enterRule(_localctx, 154, pascalParser::RuleParameterwidth);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(693);
    match(pascalParser::COLON);
    setState(694);
    expression();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- GotoStatementContext ------------------------------------------------------------------

pascalParser::GotoStatementContext::GotoStatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::GotoStatementContext::GOTO() {
  return getToken(pascalParser::GOTO, 0);
}

pascalParser::LabelContext* pascalParser::GotoStatementContext::label() {
  return getRuleContext<pascalParser::LabelContext>(0);
}


size_t pascalParser::GotoStatementContext::getRuleIndex() const {
  return pascalParser::RuleGotoStatement;
}

void pascalParser::GotoStatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterGotoStatement(this);
}

void pascalParser::GotoStatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitGotoStatement(this);
}


antlrcpp::Any pascalParser::GotoStatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitGotoStatement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::GotoStatementContext* pascalParser::gotoStatement() {
  GotoStatementContext *_localctx = _tracker.createInstance<GotoStatementContext>(_ctx, getState());
  enterRule(_localctx, 156, pascalParser::RuleGotoStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(696);
    match(pascalParser::GOTO);
    setState(697);
    label();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- EmptyStatement_Context ------------------------------------------------------------------

pascalParser::EmptyStatement_Context::EmptyStatement_Context(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t pascalParser::EmptyStatement_Context::getRuleIndex() const {
  return pascalParser::RuleEmptyStatement_;
}

void pascalParser::EmptyStatement_Context::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterEmptyStatement_(this);
}

void pascalParser::EmptyStatement_Context::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitEmptyStatement_(this);
}


antlrcpp::Any pascalParser::EmptyStatement_Context::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitEmptyStatement_(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::EmptyStatement_Context* pascalParser::emptyStatement_() {
  EmptyStatement_Context *_localctx = _tracker.createInstance<EmptyStatement_Context>(_ctx, getState());
  enterRule(_localctx, 158, pascalParser::RuleEmptyStatement_);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);

   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Empty_Context ------------------------------------------------------------------

pascalParser::Empty_Context::Empty_Context(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t pascalParser::Empty_Context::getRuleIndex() const {
  return pascalParser::RuleEmpty_;
}

void pascalParser::Empty_Context::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterEmpty_(this);
}

void pascalParser::Empty_Context::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitEmpty_(this);
}


antlrcpp::Any pascalParser::Empty_Context::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitEmpty_(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::Empty_Context* pascalParser::empty_() {
  Empty_Context *_localctx = _tracker.createInstance<Empty_Context>(_ctx, getState());
  enterRule(_localctx, 160, pascalParser::RuleEmpty_);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);

   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StructuredStatementContext ------------------------------------------------------------------

pascalParser::StructuredStatementContext::StructuredStatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::CompoundStatementContext* pascalParser::StructuredStatementContext::compoundStatement() {
  return getRuleContext<pascalParser::CompoundStatementContext>(0);
}

pascalParser::ConditionalStatementContext* pascalParser::StructuredStatementContext::conditionalStatement() {
  return getRuleContext<pascalParser::ConditionalStatementContext>(0);
}

pascalParser::RepetetiveStatementContext* pascalParser::StructuredStatementContext::repetetiveStatement() {
  return getRuleContext<pascalParser::RepetetiveStatementContext>(0);
}

pascalParser::WithStatementContext* pascalParser::StructuredStatementContext::withStatement() {
  return getRuleContext<pascalParser::WithStatementContext>(0);
}


size_t pascalParser::StructuredStatementContext::getRuleIndex() const {
  return pascalParser::RuleStructuredStatement;
}

void pascalParser::StructuredStatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStructuredStatement(this);
}

void pascalParser::StructuredStatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStructuredStatement(this);
}


antlrcpp::Any pascalParser::StructuredStatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitStructuredStatement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::StructuredStatementContext* pascalParser::structuredStatement() {
  StructuredStatementContext *_localctx = _tracker.createInstance<StructuredStatementContext>(_ctx, getState());
  enterRule(_localctx, 162, pascalParser::RuleStructuredStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(707);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::BEGIN: {
        enterOuterAlt(_localctx, 1);
        setState(703);
        compoundStatement();
        break;
      }

      case pascalParser::CASE:
      case pascalParser::IF: {
        enterOuterAlt(_localctx, 2);
        setState(704);
        conditionalStatement();
        break;
      }

      case pascalParser::FOR:
      case pascalParser::REPEAT:
      case pascalParser::WHILE: {
        enterOuterAlt(_localctx, 3);
        setState(705);
        repetetiveStatement();
        break;
      }

      case pascalParser::WITH: {
        enterOuterAlt(_localctx, 4);
        setState(706);
        withStatement();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- CompoundStatementContext ------------------------------------------------------------------

pascalParser::CompoundStatementContext::CompoundStatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::CompoundStatementContext::BEGIN() {
  return getToken(pascalParser::BEGIN, 0);
}

pascalParser::StatementsContext* pascalParser::CompoundStatementContext::statements() {
  return getRuleContext<pascalParser::StatementsContext>(0);
}

tree::TerminalNode* pascalParser::CompoundStatementContext::END() {
  return getToken(pascalParser::END, 0);
}


size_t pascalParser::CompoundStatementContext::getRuleIndex() const {
  return pascalParser::RuleCompoundStatement;
}

void pascalParser::CompoundStatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterCompoundStatement(this);
}

void pascalParser::CompoundStatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitCompoundStatement(this);
}


antlrcpp::Any pascalParser::CompoundStatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitCompoundStatement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::CompoundStatementContext* pascalParser::compoundStatement() {
  CompoundStatementContext *_localctx = _tracker.createInstance<CompoundStatementContext>(_ctx, getState());
  enterRule(_localctx, 164, pascalParser::RuleCompoundStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(709);
    match(pascalParser::BEGIN);
    setState(710);
    statements();
    setState(711);
    match(pascalParser::END);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StatementsContext ------------------------------------------------------------------

pascalParser::StatementsContext::StatementsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<pascalParser::StatementContext *> pascalParser::StatementsContext::statement() {
  return getRuleContexts<pascalParser::StatementContext>();
}

pascalParser::StatementContext* pascalParser::StatementsContext::statement(size_t i) {
  return getRuleContext<pascalParser::StatementContext>(i);
}

std::vector<tree::TerminalNode *> pascalParser::StatementsContext::SEMI() {
  return getTokens(pascalParser::SEMI);
}

tree::TerminalNode* pascalParser::StatementsContext::SEMI(size_t i) {
  return getToken(pascalParser::SEMI, i);
}


size_t pascalParser::StatementsContext::getRuleIndex() const {
  return pascalParser::RuleStatements;
}

void pascalParser::StatementsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStatements(this);
}

void pascalParser::StatementsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStatements(this);
}


antlrcpp::Any pascalParser::StatementsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitStatements(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::StatementsContext* pascalParser::statements() {
  StatementsContext *_localctx = _tracker.createInstance<StatementsContext>(_ctx, getState());
  enterRule(_localctx, 166, pascalParser::RuleStatements);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(713);
    statement();
    setState(718);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == pascalParser::SEMI) {
      setState(714);
      match(pascalParser::SEMI);
      setState(715);
      statement();
      setState(720);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ConditionalStatementContext ------------------------------------------------------------------

pascalParser::ConditionalStatementContext::ConditionalStatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::IfStatementContext* pascalParser::ConditionalStatementContext::ifStatement() {
  return getRuleContext<pascalParser::IfStatementContext>(0);
}

pascalParser::CaseStatementContext* pascalParser::ConditionalStatementContext::caseStatement() {
  return getRuleContext<pascalParser::CaseStatementContext>(0);
}


size_t pascalParser::ConditionalStatementContext::getRuleIndex() const {
  return pascalParser::RuleConditionalStatement;
}

void pascalParser::ConditionalStatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterConditionalStatement(this);
}

void pascalParser::ConditionalStatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitConditionalStatement(this);
}


antlrcpp::Any pascalParser::ConditionalStatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitConditionalStatement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ConditionalStatementContext* pascalParser::conditionalStatement() {
  ConditionalStatementContext *_localctx = _tracker.createInstance<ConditionalStatementContext>(_ctx, getState());
  enterRule(_localctx, 168, pascalParser::RuleConditionalStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(723);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::IF: {
        enterOuterAlt(_localctx, 1);
        setState(721);
        ifStatement();
        break;
      }

      case pascalParser::CASE: {
        enterOuterAlt(_localctx, 2);
        setState(722);
        caseStatement();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- IfStatementContext ------------------------------------------------------------------

pascalParser::IfStatementContext::IfStatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::IfStatementContext::IF() {
  return getToken(pascalParser::IF, 0);
}

pascalParser::ExpressionContext* pascalParser::IfStatementContext::expression() {
  return getRuleContext<pascalParser::ExpressionContext>(0);
}

tree::TerminalNode* pascalParser::IfStatementContext::THEN() {
  return getToken(pascalParser::THEN, 0);
}

std::vector<pascalParser::StatementContext *> pascalParser::IfStatementContext::statement() {
  return getRuleContexts<pascalParser::StatementContext>();
}

pascalParser::StatementContext* pascalParser::IfStatementContext::statement(size_t i) {
  return getRuleContext<pascalParser::StatementContext>(i);
}

tree::TerminalNode* pascalParser::IfStatementContext::ELSE() {
  return getToken(pascalParser::ELSE, 0);
}


size_t pascalParser::IfStatementContext::getRuleIndex() const {
  return pascalParser::RuleIfStatement;
}

void pascalParser::IfStatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterIfStatement(this);
}

void pascalParser::IfStatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitIfStatement(this);
}


antlrcpp::Any pascalParser::IfStatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitIfStatement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::IfStatementContext* pascalParser::ifStatement() {
  IfStatementContext *_localctx = _tracker.createInstance<IfStatementContext>(_ctx, getState());
  enterRule(_localctx, 170, pascalParser::RuleIfStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(725);
    match(pascalParser::IF);
    setState(726);
    expression();
    setState(727);
    match(pascalParser::THEN);
    setState(728);
    statement();
    setState(731);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 60, _ctx)) {
    case 1: {
      setState(729);
      match(pascalParser::ELSE);
      setState(730);
      statement();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- CaseStatementContext ------------------------------------------------------------------

pascalParser::CaseStatementContext::CaseStatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::CaseStatementContext::CASE() {
  return getToken(pascalParser::CASE, 0);
}

pascalParser::ExpressionContext* pascalParser::CaseStatementContext::expression() {
  return getRuleContext<pascalParser::ExpressionContext>(0);
}

tree::TerminalNode* pascalParser::CaseStatementContext::OF() {
  return getToken(pascalParser::OF, 0);
}

std::vector<pascalParser::CaseListElementContext *> pascalParser::CaseStatementContext::caseListElement() {
  return getRuleContexts<pascalParser::CaseListElementContext>();
}

pascalParser::CaseListElementContext* pascalParser::CaseStatementContext::caseListElement(size_t i) {
  return getRuleContext<pascalParser::CaseListElementContext>(i);
}

tree::TerminalNode* pascalParser::CaseStatementContext::END() {
  return getToken(pascalParser::END, 0);
}

std::vector<tree::TerminalNode *> pascalParser::CaseStatementContext::SEMI() {
  return getTokens(pascalParser::SEMI);
}

tree::TerminalNode* pascalParser::CaseStatementContext::SEMI(size_t i) {
  return getToken(pascalParser::SEMI, i);
}

tree::TerminalNode* pascalParser::CaseStatementContext::ELSE() {
  return getToken(pascalParser::ELSE, 0);
}

pascalParser::StatementsContext* pascalParser::CaseStatementContext::statements() {
  return getRuleContext<pascalParser::StatementsContext>(0);
}


size_t pascalParser::CaseStatementContext::getRuleIndex() const {
  return pascalParser::RuleCaseStatement;
}

void pascalParser::CaseStatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterCaseStatement(this);
}

void pascalParser::CaseStatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitCaseStatement(this);
}


antlrcpp::Any pascalParser::CaseStatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitCaseStatement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::CaseStatementContext* pascalParser::caseStatement() {
  CaseStatementContext *_localctx = _tracker.createInstance<CaseStatementContext>(_ctx, getState());
  enterRule(_localctx, 172, pascalParser::RuleCaseStatement);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(733);
    match(pascalParser::CASE);
    setState(734);
    expression();
    setState(735);
    match(pascalParser::OF);
    setState(736);
    caseListElement();
    setState(741);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 61, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(737);
        match(pascalParser::SEMI);
        setState(738);
        caseListElement(); 
      }
      setState(743);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 61, _ctx);
    }
    setState(747);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == pascalParser::SEMI) {
      setState(744);
      match(pascalParser::SEMI);
      setState(745);
      match(pascalParser::ELSE);
      setState(746);
      statements();
    }
    setState(749);
    match(pascalParser::END);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- CaseListElementContext ------------------------------------------------------------------

pascalParser::CaseListElementContext::CaseListElementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::ConstListContext* pascalParser::CaseListElementContext::constList() {
  return getRuleContext<pascalParser::ConstListContext>(0);
}

tree::TerminalNode* pascalParser::CaseListElementContext::COLON() {
  return getToken(pascalParser::COLON, 0);
}

pascalParser::StatementContext* pascalParser::CaseListElementContext::statement() {
  return getRuleContext<pascalParser::StatementContext>(0);
}


size_t pascalParser::CaseListElementContext::getRuleIndex() const {
  return pascalParser::RuleCaseListElement;
}

void pascalParser::CaseListElementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterCaseListElement(this);
}

void pascalParser::CaseListElementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitCaseListElement(this);
}


antlrcpp::Any pascalParser::CaseListElementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitCaseListElement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::CaseListElementContext* pascalParser::caseListElement() {
  CaseListElementContext *_localctx = _tracker.createInstance<CaseListElementContext>(_ctx, getState());
  enterRule(_localctx, 174, pascalParser::RuleCaseListElement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(751);
    constList();
    setState(752);
    match(pascalParser::COLON);
    setState(753);
    statement();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- RepetetiveStatementContext ------------------------------------------------------------------

pascalParser::RepetetiveStatementContext::RepetetiveStatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::WhileStatementContext* pascalParser::RepetetiveStatementContext::whileStatement() {
  return getRuleContext<pascalParser::WhileStatementContext>(0);
}

pascalParser::RepeatStatementContext* pascalParser::RepetetiveStatementContext::repeatStatement() {
  return getRuleContext<pascalParser::RepeatStatementContext>(0);
}

pascalParser::ForStatementContext* pascalParser::RepetetiveStatementContext::forStatement() {
  return getRuleContext<pascalParser::ForStatementContext>(0);
}


size_t pascalParser::RepetetiveStatementContext::getRuleIndex() const {
  return pascalParser::RuleRepetetiveStatement;
}

void pascalParser::RepetetiveStatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRepetetiveStatement(this);
}

void pascalParser::RepetetiveStatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRepetetiveStatement(this);
}


antlrcpp::Any pascalParser::RepetetiveStatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitRepetetiveStatement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::RepetetiveStatementContext* pascalParser::repetetiveStatement() {
  RepetetiveStatementContext *_localctx = _tracker.createInstance<RepetetiveStatementContext>(_ctx, getState());
  enterRule(_localctx, 176, pascalParser::RuleRepetetiveStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(758);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case pascalParser::WHILE: {
        enterOuterAlt(_localctx, 1);
        setState(755);
        whileStatement();
        break;
      }

      case pascalParser::REPEAT: {
        enterOuterAlt(_localctx, 2);
        setState(756);
        repeatStatement();
        break;
      }

      case pascalParser::FOR: {
        enterOuterAlt(_localctx, 3);
        setState(757);
        forStatement();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- WhileStatementContext ------------------------------------------------------------------

pascalParser::WhileStatementContext::WhileStatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::WhileStatementContext::WHILE() {
  return getToken(pascalParser::WHILE, 0);
}

pascalParser::ExpressionContext* pascalParser::WhileStatementContext::expression() {
  return getRuleContext<pascalParser::ExpressionContext>(0);
}

tree::TerminalNode* pascalParser::WhileStatementContext::DO() {
  return getToken(pascalParser::DO, 0);
}

pascalParser::StatementContext* pascalParser::WhileStatementContext::statement() {
  return getRuleContext<pascalParser::StatementContext>(0);
}


size_t pascalParser::WhileStatementContext::getRuleIndex() const {
  return pascalParser::RuleWhileStatement;
}

void pascalParser::WhileStatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterWhileStatement(this);
}

void pascalParser::WhileStatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitWhileStatement(this);
}


antlrcpp::Any pascalParser::WhileStatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitWhileStatement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::WhileStatementContext* pascalParser::whileStatement() {
  WhileStatementContext *_localctx = _tracker.createInstance<WhileStatementContext>(_ctx, getState());
  enterRule(_localctx, 178, pascalParser::RuleWhileStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(760);
    match(pascalParser::WHILE);
    setState(761);
    expression();
    setState(762);
    match(pascalParser::DO);
    setState(763);
    statement();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- RepeatStatementContext ------------------------------------------------------------------

pascalParser::RepeatStatementContext::RepeatStatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::RepeatStatementContext::REPEAT() {
  return getToken(pascalParser::REPEAT, 0);
}

pascalParser::StatementsContext* pascalParser::RepeatStatementContext::statements() {
  return getRuleContext<pascalParser::StatementsContext>(0);
}

tree::TerminalNode* pascalParser::RepeatStatementContext::UNTIL() {
  return getToken(pascalParser::UNTIL, 0);
}

pascalParser::ExpressionContext* pascalParser::RepeatStatementContext::expression() {
  return getRuleContext<pascalParser::ExpressionContext>(0);
}


size_t pascalParser::RepeatStatementContext::getRuleIndex() const {
  return pascalParser::RuleRepeatStatement;
}

void pascalParser::RepeatStatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRepeatStatement(this);
}

void pascalParser::RepeatStatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRepeatStatement(this);
}


antlrcpp::Any pascalParser::RepeatStatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitRepeatStatement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::RepeatStatementContext* pascalParser::repeatStatement() {
  RepeatStatementContext *_localctx = _tracker.createInstance<RepeatStatementContext>(_ctx, getState());
  enterRule(_localctx, 180, pascalParser::RuleRepeatStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(765);
    match(pascalParser::REPEAT);
    setState(766);
    statements();
    setState(767);
    match(pascalParser::UNTIL);
    setState(768);
    expression();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ForStatementContext ------------------------------------------------------------------

pascalParser::ForStatementContext::ForStatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::ForStatementContext::FOR() {
  return getToken(pascalParser::FOR, 0);
}

pascalParser::IdentifierContext* pascalParser::ForStatementContext::identifier() {
  return getRuleContext<pascalParser::IdentifierContext>(0);
}

tree::TerminalNode* pascalParser::ForStatementContext::ASSIGN() {
  return getToken(pascalParser::ASSIGN, 0);
}

pascalParser::ForListContext* pascalParser::ForStatementContext::forList() {
  return getRuleContext<pascalParser::ForListContext>(0);
}

tree::TerminalNode* pascalParser::ForStatementContext::DO() {
  return getToken(pascalParser::DO, 0);
}

pascalParser::StatementContext* pascalParser::ForStatementContext::statement() {
  return getRuleContext<pascalParser::StatementContext>(0);
}


size_t pascalParser::ForStatementContext::getRuleIndex() const {
  return pascalParser::RuleForStatement;
}

void pascalParser::ForStatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterForStatement(this);
}

void pascalParser::ForStatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitForStatement(this);
}


antlrcpp::Any pascalParser::ForStatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitForStatement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ForStatementContext* pascalParser::forStatement() {
  ForStatementContext *_localctx = _tracker.createInstance<ForStatementContext>(_ctx, getState());
  enterRule(_localctx, 182, pascalParser::RuleForStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(770);
    match(pascalParser::FOR);
    setState(771);
    identifier();
    setState(772);
    match(pascalParser::ASSIGN);
    setState(773);
    forList();
    setState(774);
    match(pascalParser::DO);
    setState(775);
    statement();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ForListContext ------------------------------------------------------------------

pascalParser::ForListContext::ForListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::InitialValueContext* pascalParser::ForListContext::initialValue() {
  return getRuleContext<pascalParser::InitialValueContext>(0);
}

pascalParser::FinalValueContext* pascalParser::ForListContext::finalValue() {
  return getRuleContext<pascalParser::FinalValueContext>(0);
}

tree::TerminalNode* pascalParser::ForListContext::TO() {
  return getToken(pascalParser::TO, 0);
}

tree::TerminalNode* pascalParser::ForListContext::DOWNTO() {
  return getToken(pascalParser::DOWNTO, 0);
}


size_t pascalParser::ForListContext::getRuleIndex() const {
  return pascalParser::RuleForList;
}

void pascalParser::ForListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterForList(this);
}

void pascalParser::ForListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitForList(this);
}


antlrcpp::Any pascalParser::ForListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitForList(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::ForListContext* pascalParser::forList() {
  ForListContext *_localctx = _tracker.createInstance<ForListContext>(_ctx, getState());
  enterRule(_localctx, 184, pascalParser::RuleForList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(777);
    initialValue();
    setState(778);
    _la = _input->LA(1);
    if (!(_la == pascalParser::DOWNTO

    || _la == pascalParser::TO)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
    setState(779);
    finalValue();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- InitialValueContext ------------------------------------------------------------------

pascalParser::InitialValueContext::InitialValueContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::ExpressionContext* pascalParser::InitialValueContext::expression() {
  return getRuleContext<pascalParser::ExpressionContext>(0);
}


size_t pascalParser::InitialValueContext::getRuleIndex() const {
  return pascalParser::RuleInitialValue;
}

void pascalParser::InitialValueContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInitialValue(this);
}

void pascalParser::InitialValueContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInitialValue(this);
}


antlrcpp::Any pascalParser::InitialValueContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitInitialValue(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::InitialValueContext* pascalParser::initialValue() {
  InitialValueContext *_localctx = _tracker.createInstance<InitialValueContext>(_ctx, getState());
  enterRule(_localctx, 186, pascalParser::RuleInitialValue);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(781);
    expression();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FinalValueContext ------------------------------------------------------------------

pascalParser::FinalValueContext::FinalValueContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

pascalParser::ExpressionContext* pascalParser::FinalValueContext::expression() {
  return getRuleContext<pascalParser::ExpressionContext>(0);
}


size_t pascalParser::FinalValueContext::getRuleIndex() const {
  return pascalParser::RuleFinalValue;
}

void pascalParser::FinalValueContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFinalValue(this);
}

void pascalParser::FinalValueContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFinalValue(this);
}


antlrcpp::Any pascalParser::FinalValueContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitFinalValue(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::FinalValueContext* pascalParser::finalValue() {
  FinalValueContext *_localctx = _tracker.createInstance<FinalValueContext>(_ctx, getState());
  enterRule(_localctx, 188, pascalParser::RuleFinalValue);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(783);
    expression();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- WithStatementContext ------------------------------------------------------------------

pascalParser::WithStatementContext::WithStatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* pascalParser::WithStatementContext::WITH() {
  return getToken(pascalParser::WITH, 0);
}

pascalParser::RecordVariableListContext* pascalParser::WithStatementContext::recordVariableList() {
  return getRuleContext<pascalParser::RecordVariableListContext>(0);
}

tree::TerminalNode* pascalParser::WithStatementContext::DO() {
  return getToken(pascalParser::DO, 0);
}

pascalParser::StatementContext* pascalParser::WithStatementContext::statement() {
  return getRuleContext<pascalParser::StatementContext>(0);
}


size_t pascalParser::WithStatementContext::getRuleIndex() const {
  return pascalParser::RuleWithStatement;
}

void pascalParser::WithStatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterWithStatement(this);
}

void pascalParser::WithStatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitWithStatement(this);
}


antlrcpp::Any pascalParser::WithStatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitWithStatement(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::WithStatementContext* pascalParser::withStatement() {
  WithStatementContext *_localctx = _tracker.createInstance<WithStatementContext>(_ctx, getState());
  enterRule(_localctx, 190, pascalParser::RuleWithStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(785);
    match(pascalParser::WITH);
    setState(786);
    recordVariableList();
    setState(787);
    match(pascalParser::DO);
    setState(788);
    statement();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- RecordVariableListContext ------------------------------------------------------------------

pascalParser::RecordVariableListContext::RecordVariableListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<pascalParser::VariableContext *> pascalParser::RecordVariableListContext::variable() {
  return getRuleContexts<pascalParser::VariableContext>();
}

pascalParser::VariableContext* pascalParser::RecordVariableListContext::variable(size_t i) {
  return getRuleContext<pascalParser::VariableContext>(i);
}

std::vector<tree::TerminalNode *> pascalParser::RecordVariableListContext::COMMA() {
  return getTokens(pascalParser::COMMA);
}

tree::TerminalNode* pascalParser::RecordVariableListContext::COMMA(size_t i) {
  return getToken(pascalParser::COMMA, i);
}


size_t pascalParser::RecordVariableListContext::getRuleIndex() const {
  return pascalParser::RuleRecordVariableList;
}

void pascalParser::RecordVariableListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRecordVariableList(this);
}

void pascalParser::RecordVariableListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<pascalListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRecordVariableList(this);
}


antlrcpp::Any pascalParser::RecordVariableListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<pascalVisitor*>(visitor))
    return parserVisitor->visitRecordVariableList(this);
  else
    return visitor->visitChildren(this);
}

pascalParser::RecordVariableListContext* pascalParser::recordVariableList() {
  RecordVariableListContext *_localctx = _tracker.createInstance<RecordVariableListContext>(_ctx, getState());
  enterRule(_localctx, 192, pascalParser::RuleRecordVariableList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(790);
    variable();
    setState(795);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == pascalParser::COMMA) {
      setState(791);
      match(pascalParser::COMMA);
      setState(792);
      variable();
      setState(797);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

// Static vars and initialization.
std::vector<dfa::DFA> pascalParser::_decisionToDFA;
atn::PredictionContextCache pascalParser::_sharedContextCache;

// We own the ATN which in turn owns the ATN states.
atn::ATN pascalParser::_atn;
std::vector<uint16_t> pascalParser::_serializedATN;

std::vector<std::string> pascalParser::_ruleNames = {
  "program", "programHeading", "identifier", "block", "usesUnitsPart", "labelDeclarationPart", 
  "label", "constantDefinitionPart", "constantDefinition", "constantChr", 
  "constant", "unsignedNumber", "unsignedInteger", "unsignedReal", "sign", 
  "bool_", "string", "typeDefinitionPart", "typeDefinition", "functionType", 
  "procedureType", "type_", "simpleType", "scalarType", "subrangeType", 
  "typeIdentifier", "structuredType", "unpackedStructuredType", "stringtype", 
  "arrayType", "typeList", "indexType", "componentType", "recordType", "fieldList", 
  "fixedPart", "recordSection", "variantPart", "tag", "variant", "setType", 
  "baseType", "fileType", "pointerType", "variableDeclarationPart", "variableDeclaration", 
  "procedureAndFunctionDeclarationPart", "procedureOrFunctionDeclaration", 
  "procedureDeclaration", "formalParameterList", "formalParameterSection", 
  "parameterGroup", "identifierList", "constList", "functionDeclaration", 
  "resultType", "statement", "unlabelledStatement", "simpleStatement", "assignmentStatement", 
  "variable", "expression", "relationaloperator", "simpleExpression", "additiveoperator", 
  "term", "multiplicativeoperator", "signedFactor", "factor", "unsignedConstant", 
  "functionDesignator", "parameterList", "set_", "elementList", "element", 
  "procedureStatement", "actualParameter", "parameterwidth", "gotoStatement", 
  "emptyStatement_", "empty_", "structuredStatement", "compoundStatement", 
  "statements", "conditionalStatement", "ifStatement", "caseStatement", 
  "caseListElement", "repetetiveStatement", "whileStatement", "repeatStatement", 
  "forStatement", "forList", "initialValue", "finalValue", "withStatement", 
  "recordVariableList"
};

std::vector<std::string> pascalParser::_literalNames = {
  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 
  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 
  "", "", "", "", "", "'+'", "'-'", "'*'", "'/'", "':='", "','", "';'", 
  "':'", "'='", "'<>'", "'<'", "'<='", "'>='", "'>'", "'('", "')'", "'['", 
  "'(.'", "']'", "'.)'", "'^'", "'@'", "'.'", "'..'", "'{'", "'}'"
};

std::vector<std::string> pascalParser::_symbolicNames = {
  "", "AND", "ARRAY", "BEGIN", "BOOLEAN", "CASE", "CHAR", "CHR", "CONST", 
  "DIV", "DO", "DOWNTO", "ELSE", "END", "FILE", "FOR", "FUNCTION", "GOTO", 
  "IF", "IN", "INTEGER", "LABEL", "MOD", "NIL", "NOT", "OF", "OR", "PACKED", 
  "PROCEDURE", "PROGRAM", "REAL", "RECORD", "REPEAT", "SET", "THEN", "TO", 
  "TYPE", "UNTIL", "VAR", "WHILE", "WITH", "PLUS", "MINUS", "STAR", "SLASH", 
  "ASSIGN", "COMMA", "SEMI", "COLON", "EQUAL", "NOT_EQUAL", "LT", "LE", 
  "GE", "GT", "LPAREN", "RPAREN", "LBRACK", "LBRACK2", "RBRACK", "RBRACK2", 
  "POINTER", "AT", "DOT", "DOTDOT", "LCURLY", "RCURLY", "UNIT", "INTERFACE", 
  "USES", "STRING", "IMPLEMENTATION", "TRUE", "FALSE", "WS", "COMMENT_1", 
  "COMMENT_2", "IDENT", "STRING_LITERAL", "NUM_INT", "NUM_REAL"
};

dfa::Vocabulary pascalParser::_vocabulary(_literalNames, _symbolicNames);

std::vector<std::string> pascalParser::_tokenNames;

pascalParser::Initializer::Initializer() {
	for (size_t i = 0; i < _symbolicNames.size(); ++i) {
		std::string name = _vocabulary.getLiteralName(i);
		if (name.empty()) {
			name = _vocabulary.getSymbolicName(i);
		}

		if (name.empty()) {
			_tokenNames.push_back("<INVALID>");
		} else {
      _tokenNames.push_back(name);
    }
	}

  static const uint16_t serializedATNSegment0[] = {
    0x3, 0x608b, 0xa72a, 0x8133, 0xb9ed, 0x417c, 0x3be7, 0x7786, 0x5964, 
       0x3, 0x52, 0x321, 0x4, 0x2, 0x9, 0x2, 0x4, 0x3, 0x9, 0x3, 0x4, 0x4, 
       0x9, 0x4, 0x4, 0x5, 0x9, 0x5, 0x4, 0x6, 0x9, 0x6, 0x4, 0x7, 0x9, 
       0x7, 0x4, 0x8, 0x9, 0x8, 0x4, 0x9, 0x9, 0x9, 0x4, 0xa, 0x9, 0xa, 
       0x4, 0xb, 0x9, 0xb, 0x4, 0xc, 0x9, 0xc, 0x4, 0xd, 0x9, 0xd, 0x4, 
       0xe, 0x9, 0xe, 0x4, 0xf, 0x9, 0xf, 0x4, 0x10, 0x9, 0x10, 0x4, 0x11, 
       0x9, 0x11, 0x4, 0x12, 0x9, 0x12, 0x4, 0x13, 0x9, 0x13, 0x4, 0x14, 
       0x9, 0x14, 0x4, 0x15, 0x9, 0x15, 0x4, 0x16, 0x9, 0x16, 0x4, 0x17, 
       0x9, 0x17, 0x4, 0x18, 0x9, 0x18, 0x4, 0x19, 0x9, 0x19, 0x4, 0x1a, 
       0x9, 0x1a, 0x4, 0x1b, 0x9, 0x1b, 0x4, 0x1c, 0x9, 0x1c, 0x4, 0x1d, 
       0x9, 0x1d, 0x4, 0x1e, 0x9, 0x1e, 0x4, 0x1f, 0x9, 0x1f, 0x4, 0x20, 
       0x9, 0x20, 0x4, 0x21, 0x9, 0x21, 0x4, 0x22, 0x9, 0x22, 0x4, 0x23, 
       0x9, 0x23, 0x4, 0x24, 0x9, 0x24, 0x4, 0x25, 0x9, 0x25, 0x4, 0x26, 
       0x9, 0x26, 0x4, 0x27, 0x9, 0x27, 0x4, 0x28, 0x9, 0x28, 0x4, 0x29, 
       0x9, 0x29, 0x4, 0x2a, 0x9, 0x2a, 0x4, 0x2b, 0x9, 0x2b, 0x4, 0x2c, 
       0x9, 0x2c, 0x4, 0x2d, 0x9, 0x2d, 0x4, 0x2e, 0x9, 0x2e, 0x4, 0x2f, 
       0x9, 0x2f, 0x4, 0x30, 0x9, 0x30, 0x4, 0x31, 0x9, 0x31, 0x4, 0x32, 
       0x9, 0x32, 0x4, 0x33, 0x9, 0x33, 0x4, 0x34, 0x9, 0x34, 0x4, 0x35, 
       0x9, 0x35, 0x4, 0x36, 0x9, 0x36, 0x4, 0x37, 0x9, 0x37, 0x4, 0x38, 
       0x9, 0x38, 0x4, 0x39, 0x9, 0x39, 0x4, 0x3a, 0x9, 0x3a, 0x4, 0x3b, 
       0x9, 0x3b, 0x4, 0x3c, 0x9, 0x3c, 0x4, 0x3d, 0x9, 0x3d, 0x4, 0x3e, 
       0x9, 0x3e, 0x4, 0x3f, 0x9, 0x3f, 0x4, 0x40, 0x9, 0x40, 0x4, 0x41, 
       0x9, 0x41, 0x4, 0x42, 0x9, 0x42, 0x4, 0x43, 0x9, 0x43, 0x4, 0x44, 
       0x9, 0x44, 0x4, 0x45, 0x9, 0x45, 0x4, 0x46, 0x9, 0x46, 0x4, 0x47, 
       0x9, 0x47, 0x4, 0x48, 0x9, 0x48, 0x4, 0x49, 0x9, 0x49, 0x4, 0x4a, 
       0x9, 0x4a, 0x4, 0x4b, 0x9, 0x4b, 0x4, 0x4c, 0x9, 0x4c, 0x4, 0x4d, 
       0x9, 0x4d, 0x4, 0x4e, 0x9, 0x4e, 0x4, 0x4f, 0x9, 0x4f, 0x4, 0x50, 
       0x9, 0x50, 0x4, 0x51, 0x9, 0x51, 0x4, 0x52, 0x9, 0x52, 0x4, 0x53, 
       0x9, 0x53, 0x4, 0x54, 0x9, 0x54, 0x4, 0x55, 0x9, 0x55, 0x4, 0x56, 
       0x9, 0x56, 0x4, 0x57, 0x9, 0x57, 0x4, 0x58, 0x9, 0x58, 0x4, 0x59, 
       0x9, 0x59, 0x4, 0x5a, 0x9, 0x5a, 0x4, 0x5b, 0x9, 0x5b, 0x4, 0x5c, 
       0x9, 0x5c, 0x4, 0x5d, 0x9, 0x5d, 0x4, 0x5e, 0x9, 0x5e, 0x4, 0x5f, 
       0x9, 0x5f, 0x4, 0x60, 0x9, 0x60, 0x4, 0x61, 0x9, 0x61, 0x4, 0x62, 
       0x9, 0x62, 0x3, 0x2, 0x3, 0x2, 0x5, 0x2, 0xc7, 0xa, 0x2, 0x3, 0x2, 
       0x3, 0x2, 0x3, 0x2, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 
       0x3, 0x3, 0x3, 0x5, 0x3, 0xd2, 0xa, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 
       0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x5, 0x3, 0xda, 0xa, 0x3, 0x3, 
       0x4, 0x3, 0x4, 0x3, 0x5, 0x3, 0x5, 0x3, 0x5, 0x3, 0x5, 0x3, 0x5, 
       0x3, 0x5, 0x3, 0x5, 0x7, 0x5, 0xe5, 0xa, 0x5, 0xc, 0x5, 0xe, 0x5, 
       0xe8, 0xb, 0x5, 0x3, 0x5, 0x3, 0x5, 0x3, 0x6, 0x3, 0x6, 0x3, 0x6, 
       0x3, 0x6, 0x3, 0x7, 0x3, 0x7, 0x3, 0x7, 0x3, 0x7, 0x7, 0x7, 0xf4, 
       0xa, 0x7, 0xc, 0x7, 0xe, 0x7, 0xf7, 0xb, 0x7, 0x3, 0x7, 0x3, 0x7, 
       0x3, 0x8, 0x3, 0x8, 0x3, 0x9, 0x3, 0x9, 0x3, 0x9, 0x3, 0x9, 0x6, 
       0x9, 0x101, 0xa, 0x9, 0xd, 0x9, 0xe, 0x9, 0x102, 0x3, 0xa, 0x3, 0xa, 
       0x3, 0xa, 0x3, 0xa, 0x3, 0xb, 0x3, 0xb, 0x3, 0xb, 0x3, 0xb, 0x3, 
       0xb, 0x3, 0xc, 0x3, 0xc, 0x3, 0xc, 0x3, 0xc, 0x3, 0xc, 0x3, 0xc, 
       0x3, 0xc, 0x3, 0xc, 0x3, 0xc, 0x3, 0xc, 0x5, 0xc, 0x118, 0xa, 0xc, 
       0x3, 0xd, 0x3, 0xd, 0x5, 0xd, 0x11c, 0xa, 0xd, 0x3, 0xe, 0x3, 0xe, 
       0x3, 0xf, 0x3, 0xf, 0x3, 0x10, 0x3, 0x10, 0x3, 0x11, 0x3, 0x11, 0x3, 
       0x12, 0x3, 0x12, 0x3, 0x13, 0x3, 0x13, 0x3, 0x13, 0x3, 0x13, 0x6, 
       0x13, 0x12c, 0xa, 0x13, 0xd, 0x13, 0xe, 0x13, 0x12d, 0x3, 0x14, 0x3, 
       0x14, 0x3, 0x14, 0x3, 0x14, 0x3, 0x14, 0x5, 0x14, 0x135, 0xa, 0x14, 
       0x3, 0x15, 0x3, 0x15, 0x5, 0x15, 0x139, 0xa, 0x15, 0x3, 0x15, 0x3, 
       0x15, 0x3, 0x15, 0x3, 0x16, 0x3, 0x16, 0x5, 0x16, 0x140, 0xa, 0x16, 
       0x3, 0x17, 0x3, 0x17, 0x3, 0x17, 0x5, 0x17, 0x145, 0xa, 0x17, 0x3, 
       0x18, 0x3, 0x18, 0x3, 0x18, 0x3, 0x18, 0x5, 0x18, 0x14b, 0xa, 0x18, 
       0x3, 0x19, 0x3, 0x19, 0x3, 0x19, 0x3, 0x19, 0x3, 0x1a, 0x3, 0x1a, 
       0x3, 0x1a, 0x3, 0x1a, 0x3, 0x1b, 0x3, 0x1b, 0x5, 0x1b, 0x157, 0xa, 
       0x1b, 0x3, 0x1c, 0x3, 0x1c, 0x3, 0x1c, 0x5, 0x1c, 0x15c, 0xa, 0x1c, 
       0x3, 0x1d, 0x3, 0x1d, 0x3, 0x1d, 0x3, 0x1d, 0x5, 0x1d, 0x162, 0xa, 
       0x1d, 0x3, 0x1e, 0x3, 0x1e, 0x3, 0x1e, 0x3, 0x1e, 0x5, 0x1e, 0x168, 
       0xa, 0x1e, 0x3, 0x1e, 0x3, 0x1e, 0x3, 0x1f, 0x3, 0x1f, 0x3, 0x1f, 
       0x3, 0x1f, 0x3, 0x1f, 0x3, 0x1f, 0x3, 0x1f, 0x3, 0x1f, 0x3, 0x1f, 
       0x3, 0x1f, 0x3, 0x1f, 0x3, 0x1f, 0x3, 0x1f, 0x3, 0x1f, 0x5, 0x1f, 
       0x17a, 0xa, 0x1f, 0x3, 0x20, 0x3, 0x20, 0x3, 0x20, 0x7, 0x20, 0x17f, 
       0xa, 0x20, 0xc, 0x20, 0xe, 0x20, 0x182, 0xb, 0x20, 0x3, 0x21, 0x3, 
       0x21, 0x3, 0x22, 0x3, 0x22, 0x3, 0x23, 0x3, 0x23, 0x5, 0x23, 0x18a, 
       0xa, 0x23, 0x3, 0x23, 0x3, 0x23, 0x3, 0x24, 0x3, 0x24, 0x3, 0x24, 
       0x5, 0x24, 0x191, 0xa, 0x24, 0x3, 0x24, 0x5, 0x24, 0x194, 0xa, 0x24, 
       0x3, 0x25, 0x3, 0x25, 0x3, 0x25, 0x7, 0x25, 0x199, 0xa, 0x25, 0xc, 
       0x25, 0xe, 0x25, 0x19c, 0xb, 0x25, 0x3, 0x26, 0x3, 0x26, 0x3, 0x26, 
       0x3, 0x26, 0x3, 0x27, 0x3, 0x27, 0x3, 0x27, 0x3, 0x27, 0x3, 0x27, 
       0x3, 0x27, 0x7, 0x27, 0x1a8, 0xa, 0x27, 0xc, 0x27, 0xe, 0x27, 0x1ab, 
       0xb, 0x27, 0x3, 0x28, 0x3, 0x28, 0x3, 0x28, 0x3, 0x28, 0x3, 0x28, 
       0x5, 0x28, 0x1b2, 0xa, 0x28, 0x3, 0x29, 0x3, 0x29, 0x3, 0x29, 0x3, 
       0x29, 0x3, 0x29, 0x3, 0x29, 0x3, 0x2a, 0x3, 0x2a, 0x3, 0x2a, 0x3, 
       0x2a, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2c, 0x3, 0x2c, 0x3, 0x2c, 0x3, 
       0x2c, 0x5, 0x2c, 0x1c4, 0xa, 0x2c, 0x3, 0x2d, 0x3, 0x2d, 0x3, 0x2d, 
       0x3, 0x2e, 0x3, 0x2e, 0x3, 0x2e, 0x3, 0x2e, 0x7, 0x2e, 0x1cd, 0xa, 
       0x2e, 0xc, 0x2e, 0xe, 0x2e, 0x1d0, 0xb, 0x2e, 0x3, 0x2e, 0x3, 0x2e, 
       0x3, 0x2f, 0x3, 0x2f, 0x3, 0x2f, 0x3, 0x2f, 0x3, 0x30, 0x3, 0x30, 
       0x3, 0x30, 0x3, 0x31, 0x3, 0x31, 0x5, 0x31, 0x1dd, 0xa, 0x31, 0x3, 
       0x32, 0x3, 0x32, 0x3, 0x32, 0x5, 0x32, 0x1e2, 0xa, 0x32, 0x3, 0x32, 
       0x3, 0x32, 0x3, 0x32, 0x3, 0x33, 0x3, 0x33, 0x3, 0x33, 0x3, 0x33, 
       0x7, 0x33, 0x1eb, 0xa, 0x33, 0xc, 0x33, 0xe, 0x33, 0x1ee, 0xb, 0x33, 
       0x3, 0x33, 0x3, 0x33, 0x3, 0x34, 0x3, 0x34, 0x3, 0x34, 0x3, 0x34, 
       0x3, 0x34, 0x3, 0x34, 0x3, 0x34, 0x5, 0x34, 0x1f9, 0xa, 0x34, 0x3, 
       0x35, 0x3, 0x35, 0x3, 0x35, 0x3, 0x35, 0x3, 0x36, 0x3, 0x36, 0x3, 
       0x36, 0x7, 0x36, 0x202, 0xa, 0x36, 0xc, 0x36, 0xe, 0x36, 0x205, 0xb, 
       0x36, 0x3, 0x37, 0x3, 0x37, 0x3, 0x37, 0x7, 0x37, 0x20a, 0xa, 0x37, 
       0xc, 0x37, 0xe, 0x37, 0x20d, 0xb, 0x37, 0x3, 0x38, 0x3, 0x38, 0x3, 
       0x38, 0x5, 0x38, 0x212, 0xa, 0x38, 0x3, 0x38, 0x3, 0x38, 0x3, 0x38, 
       0x3, 0x38, 0x3, 0x38, 0x3, 0x39, 0x3, 0x39, 0x3, 0x3a, 0x3, 0x3a, 
       0x3, 0x3a, 0x3, 0x3a, 0x3, 0x3a, 0x5, 0x3a, 0x220, 0xa, 0x3a, 0x3, 
       0x3b, 0x3, 0x3b, 0x5, 0x3b, 0x224, 0xa, 0x3b, 0x3, 0x3c, 0x3, 0x3c, 
       0x3, 0x3c, 0x3, 0x3c, 0x5, 0x3c, 0x22a, 0xa, 0x3c, 0x3, 0x3d, 0x3, 
       0x3d, 0x3, 0x3d, 0x3, 0x3d, 0x3, 0x3e, 0x3, 0x3e, 0x3, 0x3e, 0x5, 
       0x3e, 0x233, 0xa, 0x3e, 0x3, 0x3e, 0x3, 0x3e, 0x3, 0x3e, 0x3, 0x3e, 
       0x7, 0x3e, 0x239, 0xa, 0x3e, 0xc, 0x3e, 0xe, 0x3e, 0x23c, 0xb, 0x3e, 
       0x3, 0x3e, 0x3, 0x3e, 0x3, 0x3e, 0x3, 0x3e, 0x3, 0x3e, 0x3, 0x3e, 
       0x7, 0x3e, 0x244, 0xa, 0x3e, 0xc, 0x3e, 0xe, 0x3e, 0x247, 0xb, 0x3e, 
       0x3, 0x3e, 0x3, 0x3e, 0x3, 0x3e, 0x3, 0x3e, 0x3, 0x3e, 0x7, 0x3e, 
       0x24e, 0xa, 0x3e, 0xc, 0x3e, 0xe, 0x3e, 0x251, 0xb, 0x3e, 0x3, 0x3f, 
       0x3, 0x3f, 0x3, 0x3f, 0x3, 0x3f, 0x5, 0x3f, 0x257, 0xa, 0x3f, 0x3, 
       0x40, 0x3, 0x40, 0x3, 0x41, 0x3, 0x41, 0x3, 0x41, 0x3, 0x41, 0x5, 
       0x41, 0x25f, 0xa, 0x41, 0x3, 0x42, 0x3, 0x42, 0x3, 0x43, 0x3, 0x43, 
       0x3, 0x43, 0x3, 0x43, 0x5, 0x43, 0x267, 0xa, 0x43, 0x3, 0x44, 0x3, 
       0x44, 0x3, 0x45, 0x5, 0x45, 0x26c, 0xa, 0x45, 0x3, 0x45, 0x3, 0x45, 
       0x3, 0x46, 0x3, 0x46, 0x3, 0x46, 0x3, 0x46, 0x3, 0x46, 0x3, 0x46, 
       0x3, 0x46, 0x3, 0x46, 0x3, 0x46, 0x3, 0x46, 0x3, 0x46, 0x5, 0x46, 
       0x27b, 0xa, 0x46, 0x3, 0x47, 0x3, 0x47, 0x3, 0x47, 0x3, 0x47, 0x5, 
       0x47, 0x281, 0xa, 0x47, 0x3, 0x48, 0x3, 0x48, 0x3, 0x48, 0x3, 0x48, 
       0x3, 0x48, 0x3, 0x49, 0x3, 0x49, 0x3, 0x49, 0x7, 0x49, 0x28b, 0xa, 
       0x49, 0xc, 0x49, 0xe, 0x49, 0x28e, 0xb, 0x49, 0x3, 0x4a, 0x3, 0x4a, 
       0x3, 0x4a, 0x3, 0x4a, 0x3, 0x4a, 0x3, 0x4a, 0x3, 0x4a, 0x3, 0x4a, 
       0x5, 0x4a, 0x298, 0xa, 0x4a, 0x3, 0x4b, 0x3, 0x4b, 0x3, 0x4b, 0x7, 
       0x4b, 0x29d, 0xa, 0x4b, 0xc, 0x4b, 0xe, 0x4b, 0x2a0, 0xb, 0x4b, 0x3, 
       0x4b, 0x5, 0x4b, 0x2a3, 0xa, 0x4b, 0x3, 0x4c, 0x3, 0x4c, 0x3, 0x4c, 
       0x5, 0x4c, 0x2a8, 0xa, 0x4c, 0x3, 0x4d, 0x3, 0x4d, 0x3, 0x4d, 0x3, 
       0x4d, 0x3, 0x4d, 0x5, 0x4d, 0x2af, 0xa, 0x4d, 0x3, 0x4e, 0x3, 0x4e, 
       0x7, 0x4e, 0x2b3, 0xa, 0x4e, 0xc, 0x4e, 0xe, 0x4e, 0x2b6, 0xb, 0x4e, 
       0x3, 0x4f, 0x3, 0x4f, 0x3, 0x4f, 0x3, 0x50, 0x3, 0x50, 0x3, 0x50, 
       0x3, 0x51, 0x3, 0x51, 0x3, 0x52, 0x3, 0x52, 0x3, 0x53, 0x3, 0x53, 
       0x3, 0x53, 0x3, 0x53, 0x5, 0x53, 0x2c6, 0xa, 0x53, 0x3, 0x54, 0x3, 
       0x54, 0x3, 0x54, 0x3, 0x54, 0x3, 0x55, 0x3, 0x55, 0x3, 0x55, 0x7, 
       0x55, 0x2cf, 0xa, 0x55, 0xc, 0x55, 0xe, 0x55, 0x2d2, 0xb, 0x55, 0x3, 
       0x56, 0x3, 0x56, 0x5, 0x56, 0x2d6, 0xa, 0x56, 0x3, 0x57, 0x3, 0x57, 
       0x3, 0x57, 0x3, 0x57, 0x3, 0x57, 0x3, 0x57, 0x5, 0x57, 0x2de, 0xa, 
       0x57, 0x3, 0x58, 0x3, 0x58, 0x3, 0x58, 0x3, 0x58, 0x3, 0x58, 0x3, 
       0x58, 0x7, 0x58, 0x2e6, 0xa, 0x58, 0xc, 0x58, 0xe, 0x58, 0x2e9, 0xb, 
       0x58, 0x3, 0x58, 0x3, 0x58, 0x3, 0x58, 0x5, 0x58, 0x2ee, 0xa, 0x58, 
       0x3, 0x58, 0x3, 0x58, 0x3, 0x59, 0x3, 0x59, 0x3, 0x59, 0x3, 0x59, 
       0x3, 0x5a, 0x3, 0x5a, 0x3, 0x5a, 0x5, 0x5a, 0x2f9, 0xa, 0x5a, 0x3, 
       0x5b, 0x3, 0x5b, 0x3, 0x5b, 0x3, 0x5b, 0x3, 0x5b, 0x3, 0x5c, 0x3, 
       0x5c, 0x3, 0x5c, 0x3, 0x5c, 0x3, 0x5c, 0x3, 0x5d, 0x3, 0x5d, 0x3, 
       0x5d, 0x3, 0x5d, 0x3, 0x5d, 0x3, 0x5d, 0x3, 0x5d, 0x3, 0x5e, 0x3, 
       0x5e, 0x3, 0x5e, 0x3, 0x5e, 0x3, 0x5f, 0x3, 0x5f, 0x3, 0x60, 0x3, 
       0x60, 0x3, 0x61, 0x3, 0x61, 0x3, 0x61, 0x3, 0x61, 0x3, 0x61, 0x3, 
       0x62, 0x3, 0x62, 0x3, 0x62, 0x7, 0x62, 0x31c, 0xa, 0x62, 0xc, 0x62, 
       0xe, 0x62, 0x31f, 0xb, 0x62, 0x3, 0x62, 0x2, 0x2, 0x63, 0x2, 0x4, 
       0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 
       0x1e, 0x20, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e, 0x30, 0x32, 
       0x34, 0x36, 0x38, 0x3a, 0x3c, 0x3e, 0x40, 0x42, 0x44, 0x46, 0x48, 
       0x4a, 0x4c, 0x4e, 0x50, 0x52, 0x54, 0x56, 0x58, 0x5a, 0x5c, 0x5e, 
       0x60, 0x62, 0x64, 0x66, 0x68, 0x6a, 0x6c, 0x6e, 0x70, 0x72, 0x74, 
       0x76, 0x78, 0x7a, 0x7c, 0x7e, 0x80, 0x82, 0x84, 0x86, 0x88, 0x8a, 
       0x8c, 0x8e, 0x90, 0x92, 0x94, 0x96, 0x98, 0x9a, 0x9c, 0x9e, 0xa0, 
       0xa2, 0xa4, 0xa6, 0xa8, 0xaa, 0xac, 0xae, 0xb0, 0xb2, 0xb4, 0xb6, 
       0xb8, 0xba, 0xbc, 0xbe, 0xc0, 0xc2, 0x2, 0x9, 0x3, 0x2, 0x2b, 0x2c, 
       0x3, 0x2, 0x4a, 0x4b, 0x7, 0x2, 0x6, 0x6, 0x8, 0x8, 0x16, 0x16, 0x20, 
       0x20, 0x48, 0x48, 0x4, 0x2, 0x15, 0x15, 0x33, 0x38, 0x4, 0x2, 0x1c, 
       0x1c, 0x2b, 0x2c, 0x6, 0x2, 0x3, 0x3, 0xb, 0xb, 0x18, 0x18, 0x2d, 
       0x2e, 0x4, 0x2, 0xd, 0xd, 0x25, 0x25, 0x2, 0x31f, 0x2, 0xc4, 0x3, 
       0x2, 0x2, 0x2, 0x4, 0xd9, 0x3, 0x2, 0x2, 0x2, 0x6, 0xdb, 0x3, 0x2, 
       0x2, 0x2, 0x8, 0xe6, 0x3, 0x2, 0x2, 0x2, 0xa, 0xeb, 0x3, 0x2, 0x2, 
       0x2, 0xc, 0xef, 0x3, 0x2, 0x2, 0x2, 0xe, 0xfa, 0x3, 0x2, 0x2, 0x2, 
       0x10, 0xfc, 0x3, 0x2, 0x2, 0x2, 0x12, 0x104, 0x3, 0x2, 0x2, 0x2, 
       0x14, 0x108, 0x3, 0x2, 0x2, 0x2, 0x16, 0x117, 0x3, 0x2, 0x2, 0x2, 
       0x18, 0x11b, 0x3, 0x2, 0x2, 0x2, 0x1a, 0x11d, 0x3, 0x2, 0x2, 0x2, 
       0x1c, 0x11f, 0x3, 0x2, 0x2, 0x2, 0x1e, 0x121, 0x3, 0x2, 0x2, 0x2, 
       0x20, 0x123, 0x3, 0x2, 0x2, 0x2, 0x22, 0x125, 0x3, 0x2, 0x2, 0x2, 
       0x24, 0x127, 0x3, 0x2, 0x2, 0x2, 0x26, 0x12f, 0x3, 0x2, 0x2, 0x2, 
       0x28, 0x136, 0x3, 0x2, 0x2, 0x2, 0x2a, 0x13d, 0x3, 0x2, 0x2, 0x2, 
       0x2c, 0x144, 0x3, 0x2, 0x2, 0x2, 0x2e, 0x14a, 0x3, 0x2, 0x2, 0x2, 
       0x30, 0x14c, 0x3, 0x2, 0x2, 0x2, 0x32, 0x150, 0x3, 0x2, 0x2, 0x2, 
       0x34, 0x156, 0x3, 0x2, 0x2, 0x2, 0x36, 0x15b, 0x3, 0x2, 0x2, 0x2, 
       0x38, 0x161, 0x3, 0x2, 0x2, 0x2, 0x3a, 0x163, 0x3, 0x2, 0x2, 0x2, 
       0x3c, 0x179, 0x3, 0x2, 0x2, 0x2, 0x3e, 0x17b, 0x3, 0x2, 0x2, 0x2, 
       0x40, 0x183, 0x3, 0x2, 0x2, 0x2, 0x42, 0x185, 0x3, 0x2, 0x2, 0x2, 
       0x44, 0x187, 0x3, 0x2, 0x2, 0x2, 0x46, 0x193, 0x3, 0x2, 0x2, 0x2, 
       0x48, 0x195, 0x3, 0x2, 0x2, 0x2, 0x4a, 0x19d, 0x3, 0x2, 0x2, 0x2, 
       0x4c, 0x1a1, 0x3, 0x2, 0x2, 0x2, 0x4e, 0x1b1, 0x3, 0x2, 0x2, 0x2, 
       0x50, 0x1b3, 0x3, 0x2, 0x2, 0x2, 0x52, 0x1b9, 0x3, 0x2, 0x2, 0x2, 
       0x54, 0x1bd, 0x3, 0x2, 0x2, 0x2, 0x56, 0x1c3, 0x3, 0x2, 0x2, 0x2, 
       0x58, 0x1c5, 0x3, 0x2, 0x2, 0x2, 0x5a, 0x1c8, 0x3, 0x2, 0x2, 0x2, 
       0x5c, 0x1d3, 0x3, 0x2, 0x2, 0x2, 0x5e, 0x1d7, 0x3, 0x2, 0x2, 0x2, 
       0x60, 0x1dc, 0x3, 0x2, 0x2, 0x2, 0x62, 0x1de, 0x3, 0x2, 0x2, 0x2, 
       0x64, 0x1e6, 0x3, 0x2, 0x2, 0x2, 0x66, 0x1f8, 0x3, 0x2, 0x2, 0x2, 
       0x68, 0x1fa, 0x3, 0x2, 0x2, 0x2, 0x6a, 0x1fe, 0x3, 0x2, 0x2, 0x2, 
       0x6c, 0x206, 0x3, 0x2, 0x2, 0x2, 0x6e, 0x20e, 0x3, 0x2, 0x2, 0x2, 
       0x70, 0x218, 0x3, 0x2, 0x2, 0x2, 0x72, 0x21f, 0x3, 0x2, 0x2, 0x2, 
       0x74, 0x223, 0x3, 0x2, 0x2, 0x2, 0x76, 0x229, 0x3, 0x2, 0x2, 0x2, 
       0x78, 0x22b, 0x3, 0x2, 0x2, 0x2, 0x7a, 0x232, 0x3, 0x2, 0x2, 0x2, 
       0x7c, 0x252, 0x3, 0x2, 0x2, 0x2, 0x7e, 0x258, 0x3, 0x2, 0x2, 0x2, 
       0x80, 0x25a, 0x3, 0x2, 0x2, 0x2, 0x82, 0x260, 0x3, 0x2, 0x2, 0x2, 
       0x84, 0x262, 0x3, 0x2, 0x2, 0x2, 0x86, 0x268, 0x3, 0x2, 0x2, 0x2, 
       0x88, 0x26b, 0x3, 0x2, 0x2, 0x2, 0x8a, 0x27a, 0x3, 0x2, 0x2, 0x2, 
       0x8c, 0x280, 0x3, 0x2, 0x2, 0x2, 0x8e, 0x282, 0x3, 0x2, 0x2, 0x2, 
       0x90, 0x287, 0x3, 0x2, 0x2, 0x2, 0x92, 0x297, 0x3, 0x2, 0x2, 0x2, 
       0x94, 0x2a2, 0x3, 0x2, 0x2, 0x2, 0x96, 0x2a4, 0x3, 0x2, 0x2, 0x2, 
       0x98, 0x2a9, 0x3, 0x2, 0x2, 0x2, 0x9a, 0x2b0, 0x3, 0x2, 0x2, 0x2, 
       0x9c, 0x2b7, 0x3, 0x2, 0x2, 0x2, 0x9e, 0x2ba, 0x3, 0x2, 0x2, 0x2, 
       0xa0, 0x2bd, 0x3, 0x2, 0x2, 0x2, 0xa2, 0x2bf, 0x3, 0x2, 0x2, 0x2, 
       0xa4, 0x2c5, 0x3, 0x2, 0x2, 0x2, 0xa6, 0x2c7, 0x3, 0x2, 0x2, 0x2, 
       0xa8, 0x2cb, 0x3, 0x2, 0x2, 0x2, 0xaa, 0x2d5, 0x3, 0x2, 0x2, 0x2, 
       0xac, 0x2d7, 0x3, 0x2, 0x2, 0x2, 0xae, 0x2df, 0x3, 0x2, 0x2, 0x2, 
       0xb0, 0x2f1, 0x3, 0x2, 0x2, 0x2, 0xb2, 0x2f8, 0x3, 0x2, 0x2, 0x2, 
       0xb4, 0x2fa, 0x3, 0x2, 0x2, 0x2, 0xb6, 0x2ff, 0x3, 0x2, 0x2, 0x2, 
       0xb8, 0x304, 0x3, 0x2, 0x2, 0x2, 0xba, 0x30b, 0x3, 0x2, 0x2, 0x2, 
       0xbc, 0x30f, 0x3, 0x2, 0x2, 0x2, 0xbe, 0x311, 0x3, 0x2, 0x2, 0x2, 
       0xc0, 0x313, 0x3, 0x2, 0x2, 0x2, 0xc2, 0x318, 0x3, 0x2, 0x2, 0x2, 
       0xc4, 0xc6, 0x5, 0x4, 0x3, 0x2, 0xc5, 0xc7, 0x7, 0x46, 0x2, 0x2, 
       0xc6, 0xc5, 0x3, 0x2, 0x2, 0x2, 0xc6, 0xc7, 0x3, 0x2, 0x2, 0x2, 0xc7, 
       0xc8, 0x3, 0x2, 0x2, 0x2, 0xc8, 0xc9, 0x5, 0x8, 0x5, 0x2, 0xc9, 0xca, 
       0x7, 0x41, 0x2, 0x2, 0xca, 0x3, 0x3, 0x2, 0x2, 0x2, 0xcb, 0xcc, 0x7, 
       0x1f, 0x2, 0x2, 0xcc, 0xd1, 0x5, 0x6, 0x4, 0x2, 0xcd, 0xce, 0x7, 
       0x39, 0x2, 0x2, 0xce, 0xcf, 0x5, 0x6a, 0x36, 0x2, 0xcf, 0xd0, 0x7, 
       0x3a, 0x2, 0x2, 0xd0, 0xd2, 0x3, 0x2, 0x2, 0x2, 0xd1, 0xcd, 0x3, 
       0x2, 0x2, 0x2, 0xd1, 0xd2, 0x3, 0x2, 0x2, 0x2, 0xd2, 0xd3, 0x3, 0x2, 
       0x2, 0x2, 0xd3, 0xd4, 0x7, 0x31, 0x2, 0x2, 0xd4, 0xda, 0x3, 0x2, 
       0x2, 0x2, 0xd5, 0xd6, 0x7, 0x45, 0x2, 0x2, 0xd6, 0xd7, 0x5, 0x6, 
       0x4, 0x2, 0xd7, 0xd8, 0x7, 0x31, 0x2, 0x2, 0xd8, 0xda, 0x3, 0x2, 
       0x2, 0x2, 0xd9, 0xcb, 0x3, 0x2, 0x2, 0x2, 0xd9, 0xd5, 0x3, 0x2, 0x2, 
       0x2, 0xda, 0x5, 0x3, 0x2, 0x2, 0x2, 0xdb, 0xdc, 0x7, 0x4f, 0x2, 0x2, 
       0xdc, 0x7, 0x3, 0x2, 0x2, 0x2, 0xdd, 0xe5, 0x5, 0xc, 0x7, 0x2, 0xde, 
       0xe5, 0x5, 0x10, 0x9, 0x2, 0xdf, 0xe5, 0x5, 0x24, 0x13, 0x2, 0xe0, 
       0xe5, 0x5, 0x5a, 0x2e, 0x2, 0xe1, 0xe5, 0x5, 0x5e, 0x30, 0x2, 0xe2, 
       0xe5, 0x5, 0xa, 0x6, 0x2, 0xe3, 0xe5, 0x7, 0x49, 0x2, 0x2, 0xe4, 
       0xdd, 0x3, 0x2, 0x2, 0x2, 0xe4, 0xde, 0x3, 0x2, 0x2, 0x2, 0xe4, 0xdf, 
       0x3, 0x2, 0x2, 0x2, 0xe4, 0xe0, 0x3, 0x2, 0x2, 0x2, 0xe4, 0xe1, 0x3, 
       0x2, 0x2, 0x2, 0xe4, 0xe2, 0x3, 0x2, 0x2, 0x2, 0xe4, 0xe3, 0x3, 0x2, 
       0x2, 0x2, 0xe5, 0xe8, 0x3, 0x2, 0x2, 0x2, 0xe6, 0xe4, 0x3, 0x2, 0x2, 
       0x2, 0xe6, 0xe7, 0x3, 0x2, 0x2, 0x2, 0xe7, 0xe9, 0x3, 0x2, 0x2, 0x2, 
       0xe8, 0xe6, 0x3, 0x2, 0x2, 0x2, 0xe9, 0xea, 0x5, 0xa6, 0x54, 0x2, 
       0xea, 0x9, 0x3, 0x2, 0x2, 0x2, 0xeb, 0xec, 0x7, 0x47, 0x2, 0x2, 0xec, 
       0xed, 0x5, 0x6a, 0x36, 0x2, 0xed, 0xee, 0x7, 0x31, 0x2, 0x2, 0xee, 
       0xb, 0x3, 0x2, 0x2, 0x2, 0xef, 0xf0, 0x7, 0x17, 0x2, 0x2, 0xf0, 0xf5, 
       0x5, 0xe, 0x8, 0x2, 0xf1, 0xf2, 0x7, 0x30, 0x2, 0x2, 0xf2, 0xf4, 
       0x5, 0xe, 0x8, 0x2, 0xf3, 0xf1, 0x3, 0x2, 0x2, 0x2, 0xf4, 0xf7, 0x3, 
       0x2, 0x2, 0x2, 0xf5, 0xf3, 0x3, 0x2, 0x2, 0x2, 0xf5, 0xf6, 0x3, 0x2, 
       0x2, 0x2, 0xf6, 0xf8, 0x3, 0x2, 0x2, 0x2, 0xf7, 0xf5, 0x3, 0x2, 0x2, 
       0x2, 0xf8, 0xf9, 0x7, 0x31, 0x2, 0x2, 0xf9, 0xd, 0x3, 0x2, 0x2, 0x2, 
       0xfa, 0xfb, 0x5, 0x1a, 0xe, 0x2, 0xfb, 0xf, 0x3, 0x2, 0x2, 0x2, 0xfc, 
       0x100, 0x7, 0xa, 0x2, 0x2, 0xfd, 0xfe, 0x5, 0x12, 0xa, 0x2, 0xfe, 
       0xff, 0x7, 0x31, 0x2, 0x2, 0xff, 0x101, 0x3, 0x2, 0x2, 0x2, 0x100, 
       0xfd, 0x3, 0x2, 0x2, 0x2, 0x101, 0x102, 0x3, 0x2, 0x2, 0x2, 0x102, 
       0x100, 0x3, 0x2, 0x2, 0x2, 0x102, 0x103, 0x3, 0x2, 0x2, 0x2, 0x103, 
       0x11, 0x3, 0x2, 0x2, 0x2, 0x104, 0x105, 0x5, 0x6, 0x4, 0x2, 0x105, 
       0x106, 0x7, 0x33, 0x2, 0x2, 0x106, 0x107, 0x5, 0x16, 0xc, 0x2, 0x107, 
       0x13, 0x3, 0x2, 0x2, 0x2, 0x108, 0x109, 0x7, 0x9, 0x2, 0x2, 0x109, 
       0x10a, 0x7, 0x39, 0x2, 0x2, 0x10a, 0x10b, 0x5, 0x1a, 0xe, 0x2, 0x10b, 
       0x10c, 0x7, 0x3a, 0x2, 0x2, 0x10c, 0x15, 0x3, 0x2, 0x2, 0x2, 0x10d, 
       0x118, 0x5, 0x18, 0xd, 0x2, 0x10e, 0x10f, 0x5, 0x1e, 0x10, 0x2, 0x10f, 
       0x110, 0x5, 0x18, 0xd, 0x2, 0x110, 0x118, 0x3, 0x2, 0x2, 0x2, 0x111, 
       0x118, 0x5, 0x6, 0x4, 0x2, 0x112, 0x113, 0x5, 0x1e, 0x10, 0x2, 0x113, 
       0x114, 0x5, 0x6, 0x4, 0x2, 0x114, 0x118, 0x3, 0x2, 0x2, 0x2, 0x115, 
       0x118, 0x5, 0x22, 0x12, 0x2, 0x116, 0x118, 0x5, 0x14, 0xb, 0x2, 0x117, 
       0x10d, 0x3, 0x2, 0x2, 0x2, 0x117, 0x10e, 0x3, 0x2, 0x2, 0x2, 0x117, 
       0x111, 0x3, 0x2, 0x2, 0x2, 0x117, 0x112, 0x3, 0x2, 0x2, 0x2, 0x117, 
       0x115, 0x3, 0x2, 0x2, 0x2, 0x117, 0x116, 0x3, 0x2, 0x2, 0x2, 0x118, 
       0x17, 0x3, 0x2, 0x2, 0x2, 0x119, 0x11c, 0x5, 0x1a, 0xe, 0x2, 0x11a, 
       0x11c, 0x5, 0x1c, 0xf, 0x2, 0x11b, 0x119, 0x3, 0x2, 0x2, 0x2, 0x11b, 
       0x11a, 0x3, 0x2, 0x2, 0x2, 0x11c, 0x19, 0x3, 0x2, 0x2, 0x2, 0x11d, 
       0x11e, 0x7, 0x51, 0x2, 0x2, 0x11e, 0x1b, 0x3, 0x2, 0x2, 0x2, 0x11f, 
       0x120, 0x7, 0x52, 0x2, 0x2, 0x120, 0x1d, 0x3, 0x2, 0x2, 0x2, 0x121, 
       0x122, 0x9, 0x2, 0x2, 0x2, 0x122, 0x1f, 0x3, 0x2, 0x2, 0x2, 0x123, 
       0x124, 0x9, 0x3, 0x2, 0x2, 0x124, 0x21, 0x3, 0x2, 0x2, 0x2, 0x125, 
       0x126, 0x7, 0x50, 0x2, 0x2, 0x126, 0x23, 0x3, 0x2, 0x2, 0x2, 0x127, 
       0x12b, 0x7, 0x26, 0x2, 0x2, 0x128, 0x129, 0x5, 0x26, 0x14, 0x2, 0x129, 
       0x12a, 0x7, 0x31, 0x2, 0x2, 0x12a, 0x12c, 0x3, 0x2, 0x2, 0x2, 0x12b, 
       0x128, 0x3, 0x2, 0x2, 0x2, 0x12c, 0x12d, 0x3, 0x2, 0x2, 0x2, 0x12d, 
       0x12b, 0x3, 0x2, 0x2, 0x2, 0x12d, 0x12e, 0x3, 0x2, 0x2, 0x2, 0x12e, 
       0x25, 0x3, 0x2, 0x2, 0x2, 0x12f, 0x130, 0x5, 0x6, 0x4, 0x2, 0x130, 
       0x134, 0x7, 0x33, 0x2, 0x2, 0x131, 0x135, 0x5, 0x2c, 0x17, 0x2, 0x132, 
       0x135, 0x5, 0x28, 0x15, 0x2, 0x133, 0x135, 0x5, 0x2a, 0x16, 0x2, 
       0x134, 0x131, 0x3, 0x2, 0x2, 0x2, 0x134, 0x132, 0x3, 0x2, 0x2, 0x2, 
       0x134, 0x133, 0x3, 0x2, 0x2, 0x2, 0x135, 0x27, 0x3, 0x2, 0x2, 0x2, 
       0x136, 0x138, 0x7, 0x12, 0x2, 0x2, 0x137, 0x139, 0x5, 0x64, 0x33, 
       0x2, 0x138, 0x137, 0x3, 0x2, 0x2, 0x2, 0x138, 0x139, 0x3, 0x2, 0x2, 
       0x2, 0x139, 0x13a, 0x3, 0x2, 0x2, 0x2, 0x13a, 0x13b, 0x7, 0x32, 0x2, 
       0x2, 0x13b, 0x13c, 0x5, 0x70, 0x39, 0x2, 0x13c, 0x29, 0x3, 0x2, 0x2, 
       0x2, 0x13d, 0x13f, 0x7, 0x1e, 0x2, 0x2, 0x13e, 0x140, 0x5, 0x64, 
       0x33, 0x2, 0x13f, 0x13e, 0x3, 0x2, 0x2, 0x2, 0x13f, 0x140, 0x3, 0x2, 
       0x2, 0x2, 0x140, 0x2b, 0x3, 0x2, 0x2, 0x2, 0x141, 0x145, 0x5, 0x2e, 
       0x18, 0x2, 0x142, 0x145, 0x5, 0x36, 0x1c, 0x2, 0x143, 0x145, 0x5, 
       0x58, 0x2d, 0x2, 0x144, 0x141, 0x3, 0x2, 0x2, 0x2, 0x144, 0x142, 
       0x3, 0x2, 0x2, 0x2, 0x144, 0x143, 0x3, 0x2, 0x2, 0x2, 0x145, 0x2d, 
       0x3, 0x2, 0x2, 0x2, 0x146, 0x14b, 0x5, 0x30, 0x19, 0x2, 0x147, 0x14b, 
       0x5, 0x32, 0x1a, 0x2, 0x148, 0x14b, 0x5, 0x34, 0x1b, 0x2, 0x149, 
       0x14b, 0x5, 0x3a, 0x1e, 0x2, 0x14a, 0x146, 0x3, 0x2, 0x2, 0x2, 0x14a, 
       0x147, 0x3, 0x2, 0x2, 0x2, 0x14a, 0x148, 0x3, 0x2, 0x2, 0x2, 0x14a, 
       0x149, 0x3, 0x2, 0x2, 0x2, 0x14b, 0x2f, 0x3, 0x2, 0x2, 0x2, 0x14c, 
       0x14d, 0x7, 0x39, 0x2, 0x2, 0x14d, 0x14e, 0x5, 0x6a, 0x36, 0x2, 0x14e, 
       0x14f, 0x7, 0x3a, 0x2, 0x2, 0x14f, 0x31, 0x3, 0x2, 0x2, 0x2, 0x150, 
       0x151, 0x5, 0x16, 0xc, 0x2, 0x151, 0x152, 0x7, 0x42, 0x2, 0x2, 0x152, 
       0x153, 0x5, 0x16, 0xc, 0x2, 0x153, 0x33, 0x3, 0x2, 0x2, 0x2, 0x154, 
       0x157, 0x5, 0x6, 0x4, 0x2, 0x155, 0x157, 0x9, 0x4, 0x2, 0x2, 0x156, 
       0x154, 0x3, 0x2, 0x2, 0x2, 0x156, 0x155, 0x3, 0x2, 0x2, 0x2, 0x157, 
       0x35, 0x3, 0x2, 0x2, 0x2, 0x158, 0x159, 0x7, 0x1d, 0x2, 0x2, 0x159, 
       0x15c, 0x5, 0x38, 0x1d, 0x2, 0x15a, 0x15c, 0x5, 0x38, 0x1d, 0x2, 
       0x15b, 0x158, 0x3, 0x2, 0x2, 0x2, 0x15b, 0x15a, 0x3, 0x2, 0x2, 0x2, 
       0x15c, 0x37, 0x3, 0x2, 0x2, 0x2, 0x15d, 0x162, 0x5, 0x3c, 0x1f, 0x2, 
       0x15e, 0x162, 0x5, 0x44, 0x23, 0x2, 0x15f, 0x162, 0x5, 0x52, 0x2a, 
       0x2, 0x160, 0x162, 0x5, 0x56, 0x2c, 0x2, 0x161, 0x15d, 0x3, 0x2, 
       0x2, 0x2, 0x161, 0x15e, 0x3, 0x2, 0x2, 0x2, 0x161, 0x15f, 0x3, 0x2, 
       0x2, 0x2, 0x161, 0x160, 0x3, 0x2, 0x2, 0x2, 0x162, 0x39, 0x3, 0x2, 
       0x2, 0x2, 0x163, 0x164, 0x7, 0x48, 0x2, 0x2, 0x164, 0x167, 0x7, 0x3b, 
       0x2, 0x2, 0x165, 0x168, 0x5, 0x6, 0x4, 0x2, 0x166, 0x168, 0x5, 0x18, 
       0xd, 0x2, 0x167, 0x165, 0x3, 0x2, 0x2, 0x2, 0x167, 0x166, 0x3, 0x2, 
       0x2, 0x2, 0x168, 0x169, 0x3, 0x2, 0x2, 0x2, 0x169, 0x16a, 0x7, 0x3d, 
       0x2, 0x2, 0x16a, 0x3b, 0x3, 0x2, 0x2, 0x2, 0x16b, 0x16c, 0x7, 0x4, 
       0x2, 0x2, 0x16c, 0x16d, 0x7, 0x3b, 0x2, 0x2, 0x16d, 0x16e, 0x5, 0x3e, 
       0x20, 0x2, 0x16e, 0x16f, 0x7, 0x3d, 0x2, 0x2, 0x16f, 0x170, 0x7, 
       0x1b, 0x2, 0x2, 0x170, 0x171, 0x5, 0x42, 0x22, 0x2, 0x171, 0x17a, 
       0x3, 0x2, 0x2, 0x2, 0x172, 0x173, 0x7, 0x4, 0x2, 0x2, 0x173, 0x174, 
       0x7, 0x3c, 0x2, 0x2, 0x174, 0x175, 0x5, 0x3e, 0x20, 0x2, 0x175, 0x176, 
       0x7, 0x3e, 0x2, 0x2, 0x176, 0x177, 0x7, 0x1b, 0x2, 0x2, 0x177, 0x178, 
       0x5, 0x42, 0x22, 0x2, 0x178, 0x17a, 0x3, 0x2, 0x2, 0x2, 0x179, 0x16b, 
       0x3, 0x2, 0x2, 0x2, 0x179, 0x172, 0x3, 0x2, 0x2, 0x2, 0x17a, 0x3d, 
       0x3, 0x2, 0x2, 0x2, 0x17b, 0x180, 0x5, 0x40, 0x21, 0x2, 0x17c, 0x17d, 
       0x7, 0x30, 0x2, 0x2, 0x17d, 0x17f, 0x5, 0x40, 0x21, 0x2, 0x17e, 0x17c, 
       0x3, 0x2, 0x2, 0x2, 0x17f, 0x182, 0x3, 0x2, 0x2, 0x2, 0x180, 0x17e, 
       0x3, 0x2, 0x2, 0x2, 0x180, 0x181, 0x3, 0x2, 0x2, 0x2, 0x181, 0x3f, 
       0x3, 0x2, 0x2, 0x2, 0x182, 0x180, 0x3, 0x2, 0x2, 0x2, 0x183, 0x184, 
       0x5, 0x2e, 0x18, 0x2, 0x184, 0x41, 0x3, 0x2, 0x2, 0x2, 0x185, 0x186, 
       0x5, 0x2c, 0x17, 0x2, 0x186, 0x43, 0x3, 0x2, 0x2, 0x2, 0x187, 0x189, 
       0x7, 0x21, 0x2, 0x2, 0x188, 0x18a, 0x5, 0x46, 0x24, 0x2, 0x189, 0x188, 
       0x3, 0x2, 0x2, 0x2, 0x189, 0x18a, 0x3, 0x2, 0x2, 0x2, 0x18a, 0x18b, 
       0x3, 0x2, 0x2, 0x2, 0x18b, 0x18c, 0x7, 0xf, 0x2, 0x2, 0x18c, 0x45, 
       0x3, 0x2, 0x2, 0x2, 0x18d, 0x190, 0x5, 0x48, 0x25, 0x2, 0x18e, 0x18f, 
       0x7, 0x31, 0x2, 0x2, 0x18f, 0x191, 0x5, 0x4c, 0x27, 0x2, 0x190, 0x18e, 
       0x3, 0x2, 0x2, 0x2, 0x190, 0x191, 0x3, 0x2, 0x2, 0x2, 0x191, 0x194, 
       0x3, 0x2, 0x2, 0x2, 0x192, 0x194, 0x5, 0x4c, 0x27, 0x2, 0x193, 0x18d, 
       0x3, 0x2, 0x2, 0x2, 0x193, 0x192, 0x3, 0x2, 0x2, 0x2, 0x194, 0x47, 
       0x3, 0x2, 0x2, 0x2, 0x195, 0x19a, 0x5, 0x4a, 0x26, 0x2, 0x196, 0x197, 
       0x7, 0x31, 0x2, 0x2, 0x197, 0x199, 0x5, 0x4a, 0x26, 0x2, 0x198, 0x196, 
       0x3, 0x2, 0x2, 0x2, 0x199, 0x19c, 0x3, 0x2, 0x2, 0x2, 0x19a, 0x198, 
       0x3, 0x2, 0x2, 0x2, 0x19a, 0x19b, 0x3, 0x2, 0x2, 0x2, 0x19b, 0x49, 
       0x3, 0x2, 0x2, 0x2, 0x19c, 0x19a, 0x3, 0x2, 0x2, 0x2, 0x19d, 0x19e, 
       0x5, 0x6a, 0x36, 0x2, 0x19e, 0x19f, 0x7, 0x32, 0x2, 0x2, 0x19f, 0x1a0, 
       0x5, 0x2c, 0x17, 0x2, 0x1a0, 0x4b, 0x3, 0x2, 0x2, 0x2, 0x1a1, 0x1a2, 
       0x7, 0x7, 0x2, 0x2, 0x1a2, 0x1a3, 0x5, 0x4e, 0x28, 0x2, 0x1a3, 0x1a4, 
       0x7, 0x1b, 0x2, 0x2, 0x1a4, 0x1a9, 0x5, 0x50, 0x29, 0x2, 0x1a5, 0x1a6, 
       0x7, 0x31, 0x2, 0x2, 0x1a6, 0x1a8, 0x5, 0x50, 0x29, 0x2, 0x1a7, 0x1a5, 
       0x3, 0x2, 0x2, 0x2, 0x1a8, 0x1ab, 0x3, 0x2, 0x2, 0x2, 0x1a9, 0x1a7, 
       0x3, 0x2, 0x2, 0x2, 0x1a9, 0x1aa, 0x3, 0x2, 0x2, 0x2, 0x1aa, 0x4d, 
       0x3, 0x2, 0x2, 0x2, 0x1ab, 0x1a9, 0x3, 0x2, 0x2, 0x2, 0x1ac, 0x1ad, 
       0x5, 0x6, 0x4, 0x2, 0x1ad, 0x1ae, 0x7, 0x32, 0x2, 0x2, 0x1ae, 0x1af, 
       0x5, 0x34, 0x1b, 0x2, 0x1af, 0x1b2, 0x3, 0x2, 0x2, 0x2, 0x1b0, 0x1b2, 
       0x5, 0x34, 0x1b, 0x2, 0x1b1, 0x1ac, 0x3, 0x2, 0x2, 0x2, 0x1b1, 0x1b0, 
       0x3, 0x2, 0x2, 0x2, 0x1b2, 0x4f, 0x3, 0x2, 0x2, 0x2, 0x1b3, 0x1b4, 
       0x5, 0x6c, 0x37, 0x2, 0x1b4, 0x1b5, 0x7, 0x32, 0x2, 0x2, 0x1b5, 0x1b6, 
       0x7, 0x39, 0x2, 0x2, 0x1b6, 0x1b7, 0x5, 0x46, 0x24, 0x2, 0x1b7, 0x1b8, 
       0x7, 0x3a, 0x2, 0x2, 0x1b8, 0x51, 0x3, 0x2, 0x2, 0x2, 0x1b9, 0x1ba, 
       0x7, 0x23, 0x2, 0x2, 0x1ba, 0x1bb, 0x7, 0x1b, 0x2, 0x2, 0x1bb, 0x1bc, 
       0x5, 0x54, 0x2b, 0x2, 0x1bc, 0x53, 0x3, 0x2, 0x2, 0x2, 0x1bd, 0x1be, 
       0x5, 0x2e, 0x18, 0x2, 0x1be, 0x55, 0x3, 0x2, 0x2, 0x2, 0x1bf, 0x1c0, 
       0x7, 0x10, 0x2, 0x2, 0x1c0, 0x1c1, 0x7, 0x1b, 0x2, 0x2, 0x1c1, 0x1c4, 
       0x5, 0x2c, 0x17, 0x2, 0x1c2, 0x1c4, 0x7, 0x10, 0x2, 0x2, 0x1c3, 0x1bf, 
       0x3, 0x2, 0x2, 0x2, 0x1c3, 0x1c2, 0x3, 0x2, 0x2, 0x2, 0x1c4, 0x57, 
       0x3, 0x2, 0x2, 0x2, 0x1c5, 0x1c6, 0x7, 0x3f, 0x2, 0x2, 0x1c6, 0x1c7, 
       0x5, 0x34, 0x1b, 0x2, 0x1c7, 0x59, 0x3, 0x2, 0x2, 0x2, 0x1c8, 0x1c9, 
       0x7, 0x28, 0x2, 0x2, 0x1c9, 0x1ce, 0x5, 0x5c, 0x2f, 0x2, 0x1ca, 0x1cb, 
       0x7, 0x31, 0x2, 0x2, 0x1cb, 0x1cd, 0x5, 0x5c, 0x2f, 0x2, 0x1cc, 0x1ca, 
       0x3, 0x2, 0x2, 0x2, 0x1cd, 0x1d0, 0x3, 0x2, 0x2, 0x2, 0x1ce, 0x1cc, 
       0x3, 0x2, 0x2, 0x2, 0x1ce, 0x1cf, 0x3, 0x2, 0x2, 0x2, 0x1cf, 0x1d1, 
       0x3, 0x2, 0x2, 0x2, 0x1d0, 0x1ce, 0x3, 0x2, 0x2, 0x2, 0x1d1, 0x1d2, 
       0x7, 0x31, 0x2, 0x2, 0x1d2, 0x5b, 0x3, 0x2, 0x2, 0x2, 0x1d3, 0x1d4, 
       0x5, 0x6a, 0x36, 0x2, 0x1d4, 0x1d5, 0x7, 0x32, 0x2, 0x2, 0x1d5, 0x1d6, 
       0x5, 0x2c, 0x17, 0x2, 0x1d6, 0x5d, 0x3, 0x2, 0x2, 0x2, 0x1d7, 0x1d8, 
       0x5, 0x60, 0x31, 0x2, 0x1d8, 0x1d9, 0x7, 0x31, 0x2, 0x2, 0x1d9, 0x5f, 
       0x3, 0x2, 0x2, 0x2, 0x1da, 0x1dd, 0x5, 0x62, 0x32, 0x2, 0x1db, 0x1dd, 
       0x5, 0x6e, 0x38, 0x2, 0x1dc, 0x1da, 0x3, 0x2, 0x2, 0x2, 0x1dc, 0x1db, 
       0x3, 0x2, 0x2, 0x2, 0x1dd, 0x61, 0x3, 0x2, 0x2, 0x2, 0x1de, 0x1df, 
       0x7, 0x1e, 0x2, 0x2, 0x1df, 0x1e1, 0x5, 0x6, 0x4, 0x2, 0x1e0, 0x1e2, 
       0x5, 0x64, 0x33, 0x2, 0x1e1, 0x1e0, 0x3, 0x2, 0x2, 0x2, 0x1e1, 0x1e2, 
       0x3, 0x2, 0x2, 0x2, 0x1e2, 0x1e3, 0x3, 0x2, 0x2, 0x2, 0x1e3, 0x1e4, 
       0x7, 0x31, 0x2, 0x2, 0x1e4, 0x1e5, 0x5, 0x8, 0x5, 0x2, 0x1e5, 0x63, 
       0x3, 0x2, 0x2, 0x2, 0x1e6, 0x1e7, 0x7, 0x39, 0x2, 0x2, 0x1e7, 0x1ec, 
       0x5, 0x66, 0x34, 0x2, 0x1e8, 0x1e9, 0x7, 0x31, 0x2, 0x2, 0x1e9, 0x1eb, 
       0x5, 0x66, 0x34, 0x2, 0x1ea, 0x1e8, 0x3, 0x2, 0x2, 0x2, 0x1eb, 0x1ee, 
       0x3, 0x2, 0x2, 0x2, 0x1ec, 0x1ea, 0x3, 0x2, 0x2, 0x2, 0x1ec, 0x1ed, 
       0x3, 0x2, 0x2, 0x2, 0x1ed, 0x1ef, 0x3, 0x2, 0x2, 0x2, 0x1ee, 0x1ec, 
       0x3, 0x2, 0x2, 0x2, 0x1ef, 0x1f0, 0x7, 0x3a, 0x2, 0x2, 0x1f0, 0x65, 
       0x3, 0x2, 0x2, 0x2, 0x1f1, 0x1f9, 0x5, 0x68, 0x35, 0x2, 0x1f2, 0x1f3, 
       0x7, 0x28, 0x2, 0x2, 0x1f3, 0x1f9, 0x5, 0x68, 0x35, 0x2, 0x1f4, 0x1f5, 
       0x7, 0x12, 0x2, 0x2, 0x1f5, 0x1f9, 0x5, 0x68, 0x35, 0x2, 0x1f6, 0x1f7, 
       0x7, 0x1e, 0x2, 0x2, 0x1f7, 0x1f9, 0x5, 0x68, 0x35, 0x2, 0x1f8, 0x1f1, 
       0x3, 0x2, 0x2, 0x2, 0x1f8, 0x1f2, 0x3, 0x2, 0x2, 0x2, 0x1f8, 0x1f4, 
       0x3, 0x2, 0x2, 0x2, 0x1f8, 0x1f6, 0x3, 0x2, 0x2, 0x2, 0x1f9, 0x67, 
       0x3, 0x2, 0x2, 0x2, 0x1fa, 0x1fb, 0x5, 0x6a, 0x36, 0x2, 0x1fb, 0x1fc, 
       0x7, 0x32, 0x2, 0x2, 0x1fc, 0x1fd, 0x5, 0x34, 0x1b, 0x2, 0x1fd, 0x69, 
       0x3, 0x2, 0x2, 0x2, 0x1fe, 0x203, 0x5, 0x6, 0x4, 0x2, 0x1ff, 0x200, 
       0x7, 0x30, 0x2, 0x2, 0x200, 0x202, 0x5, 0x6, 0x4, 0x2, 0x201, 0x1ff, 
       0x3, 0x2, 0x2, 0x2, 0x202, 0x205, 0x3, 0x2, 0x2, 0x2, 0x203, 0x201, 
       0x3, 0x2, 0x2, 0x2, 0x203, 0x204, 0x3, 0x2, 0x2, 0x2, 0x204, 0x6b, 
       0x3, 0x2, 0x2, 0x2, 0x205, 0x203, 0x3, 0x2, 0x2, 0x2, 0x206, 0x20b, 
       0x5, 0x16, 0xc, 0x2, 0x207, 0x208, 0x7, 0x30, 0x2, 0x2, 0x208, 0x20a, 
       0x5, 0x16, 0xc, 0x2, 0x209, 0x207, 0x3, 0x2, 0x2, 0x2, 0x20a, 0x20d, 
       0x3, 0x2, 0x2, 0x2, 0x20b, 0x209, 0x3, 0x2, 0x2, 0x2, 0x20b, 0x20c, 
       0x3, 0x2, 0x2, 0x2, 0x20c, 0x6d, 0x3, 0x2, 0x2, 0x2, 0x20d, 0x20b, 
       0x3, 0x2, 0x2, 0x2, 0x20e, 0x20f, 0x7, 0x12, 0x2, 0x2, 0x20f, 0x211, 
       0x5, 0x6, 0x4, 0x2, 0x210, 0x212, 0x5, 0x64, 0x33, 0x2, 0x211, 0x210, 
       0x3, 0x2, 0x2, 0x2, 0x211, 0x212, 0x3, 0x2, 0x2, 0x2, 0x212, 0x213, 
       0x3, 0x2, 0x2, 0x2, 0x213, 0x214, 0x7, 0x32, 0x2, 0x2, 0x214, 0x215, 
       0x5, 0x70, 0x39, 0x2, 0x215, 0x216, 0x7, 0x31, 0x2, 0x2, 0x216, 0x217, 
       0x5, 0x8, 0x5, 0x2, 0x217, 0x6f, 0x3, 0x2, 0x2, 0x2, 0x218, 0x219, 
       0x5, 0x34, 0x1b, 0x2, 0x219, 0x71, 0x3, 0x2, 0x2, 0x2, 0x21a, 0x21b, 
       0x5, 0xe, 0x8, 0x2, 0x21b, 0x21c, 0x7, 0x32, 0x2, 0x2, 0x21c, 0x21d, 
       0x5, 0x74, 0x3b, 0x2, 0x21d, 0x220, 0x3, 0x2, 0x2, 0x2, 0x21e, 0x220, 
       0x5, 0x74, 0x3b, 0x2, 0x21f, 0x21a, 0x3, 0x2, 0x2, 0x2, 0x21f, 0x21e, 
       0x3, 0x2, 0x2, 0x2, 0x220, 0x73, 0x3, 0x2, 0x2, 0x2, 0x221, 0x224, 
       0x5, 0x76, 0x3c, 0x2, 0x222, 0x224, 0x5, 0xa4, 0x53, 0x2, 0x223, 
       0x221, 0x3, 0x2, 0x2, 0x2, 0x223, 0x222, 0x3, 0x2, 0x2, 0x2, 0x224, 
       0x75, 0x3, 0x2, 0x2, 0x2, 0x225, 0x22a, 0x5, 0x78, 0x3d, 0x2, 0x226, 
       0x22a, 0x5, 0x98, 0x4d, 0x2, 0x227, 0x22a, 0x5, 0x9e, 0x50, 0x2, 
       0x228, 0x22a, 0x5, 0xa0, 0x51, 0x2, 0x229, 0x225, 0x3, 0x2, 0x2, 
       0x2, 0x229, 0x226, 0x3, 0x2, 0x2, 0x2, 0x229, 0x227, 0x3, 0x2, 0x2, 
       0x2, 0x229, 0x228, 0x3, 0x2, 0x2, 0x2, 0x22a, 0x77, 0x3, 0x2, 0x2, 
       0x2, 0x22b, 0x22c, 0x5, 0x7a, 0x3e, 0x2, 0x22c, 0x22d, 0x7, 0x2f, 
       0x2, 0x2, 0x22d, 0x22e, 0x5, 0x7c, 0x3f, 0x2, 0x22e, 0x79, 0x3, 0x2, 
       0x2, 0x2, 0x22f, 0x230, 0x7, 0x40, 0x2, 0x2, 0x230, 0x233, 0x5, 0x6, 
       0x4, 0x2, 0x231, 0x233, 0x5, 0x6, 0x4, 0x2, 0x232, 0x22f, 0x3, 0x2, 
       0x2, 0x2, 0x232, 0x231, 0x3, 0x2, 0x2, 0x2, 0x233, 0x24f, 0x3, 0x2, 
       0x2, 0x2, 0x234, 0x235, 0x7, 0x3b, 0x2, 0x2, 0x235, 0x23a, 0x5, 0x7c, 
       0x3f, 0x2, 0x236, 0x237, 0x7, 0x30, 0x2, 0x2, 0x237, 0x239, 0x5, 
       0x7c, 0x3f, 0x2, 0x238, 0x236, 0x3, 0x2, 0x2, 0x2, 0x239, 0x23c, 
       0x3, 0x2, 0x2, 0x2, 0x23a, 0x238, 0x3, 0x2, 0x2, 0x2, 0x23a, 0x23b, 
       0x3, 0x2, 0x2, 0x2, 0x23b, 0x23d, 0x3, 0x2, 0x2, 0x2, 0x23c, 0x23a, 
       0x3, 0x2, 0x2, 0x2, 0x23d, 0x23e, 0x7, 0x3d, 0x2, 0x2, 0x23e, 0x24e, 
       0x3, 0x2, 0x2, 0x2, 0x23f, 0x240, 0x7, 0x3c, 0x2, 0x2, 0x240, 0x245, 
       0x5, 0x7c, 0x3f, 0x2, 0x241, 0x242, 0x7, 0x30, 0x2, 0x2, 0x242, 0x244, 
       0x5, 0x7c, 0x3f, 0x2, 0x243, 0x241, 0x3, 0x2, 0x2, 0x2, 0x244, 0x247, 
       0x3, 0x2, 0x2, 0x2, 0x245, 0x243, 0x3, 0x2, 0x2, 0x2, 0x245, 0x246, 
       0x3, 0x2, 0x2, 0x2, 0x246, 0x248, 0x3, 0x2, 0x2, 0x2, 0x247, 0x245, 
       0x3, 0x2, 0x2, 0x2, 0x248, 0x249, 0x7, 0x3e, 0x2, 0x2, 0x249, 0x24e, 
       0x3, 0x2, 0x2, 0x2, 0x24a, 0x24b, 0x7, 0x41, 0x2, 0x2, 0x24b, 0x24e, 
       0x5, 0x6, 0x4, 0x2, 0x24c, 0x24e, 0x7, 0x3f, 0x2, 0x2, 0x24d, 0x234, 
       0x3, 0x2, 0x2, 0x2, 0x24d, 0x23f, 0x3, 0x2, 0x2, 0x2, 0x24d, 0x24a, 
       0x3, 0x2, 0x2, 0x2, 0x24d, 0x24c, 0x3, 0x2, 0x2, 0x2, 0x24e, 0x251, 
       0x3, 0x2, 0x2, 0x2, 0x24f, 0x24d, 0x3, 0x2, 0x2, 0x2, 0x24f, 0x250, 
       0x3, 0x2, 0x2, 0x2, 0x250, 0x7b, 0x3, 0x2, 0x2, 0x2, 0x251, 0x24f, 
       0x3, 0x2, 0x2, 0x2, 0x252, 0x256, 0x5, 0x80, 0x41, 0x2, 0x253, 0x254, 
       0x5, 0x7e, 0x40, 0x2, 0x254, 0x255, 0x5, 0x7c, 0x3f, 0x2, 0x255, 
       0x257, 0x3, 0x2, 0x2, 0x2, 0x256, 0x253, 0x3, 0x2, 0x2, 0x2, 0x256, 
       0x257, 0x3, 0x2, 0x2, 0x2, 0x257, 0x7d, 0x3, 0x2, 0x2, 0x2, 0x258, 
       0x259, 0x9, 0x5, 0x2, 0x2, 0x259, 0x7f, 0x3, 0x2, 0x2, 0x2, 0x25a, 
       0x25e, 0x5, 0x84, 0x43, 0x2, 0x25b, 0x25c, 0x5, 0x82, 0x42, 0x2, 
       0x25c, 0x25d, 0x5, 0x80, 0x41, 0x2, 0x25d, 0x25f, 0x3, 0x2, 0x2, 
       0x2, 0x25e, 0x25b, 0x3, 0x2, 0x2, 0x2, 0x25e, 0x25f, 0x3, 0x2, 0x2, 
       0x2, 0x25f, 0x81, 0x3, 0x2, 0x2, 0x2, 0x260, 0x261, 0x9, 0x6, 0x2, 
       0x2, 0x261, 0x83, 0x3, 0x2, 0x2, 0x2, 0x262, 0x266, 0x5, 0x88, 0x45, 
       0x2, 0x263, 0x264, 0x5, 0x86, 0x44, 0x2, 0x264, 0x265, 0x5, 0x84, 
       0x43, 0x2, 0x265, 0x267, 0x3, 0x2, 0x2, 0x2, 0x266, 0x263, 0x3, 0x2, 
       0x2, 0x2, 0x266, 0x267, 0x3, 0x2, 0x2, 0x2, 0x267, 0x85, 0x3, 0x2, 
       0x2, 0x2, 0x268, 0x269, 0x9, 0x7, 0x2, 0x2, 0x269, 0x87, 0x3, 0x2, 
       0x2, 0x2, 0x26a, 0x26c, 0x9, 0x2, 0x2, 0x2, 0x26b, 0x26a, 0x3, 0x2, 
       0x2, 0x2, 0x26b, 0x26c, 0x3, 0x2, 0x2, 0x2, 0x26c, 0x26d, 0x3, 0x2, 
       0x2, 0x2, 0x26d, 0x26e, 0x5, 0x8a, 0x46, 0x2, 0x26e, 0x89, 0x3, 0x2, 
       0x2, 0x2, 0x26f, 0x27b, 0x5, 0x7a, 0x3e, 0x2, 0x270, 0x271, 0x7, 
       0x39, 0x2, 0x2, 0x271, 0x272, 0x5, 0x7c, 0x3f, 0x2, 0x272, 0x273, 
       0x7, 0x3a, 0x2, 0x2, 0x273, 0x27b, 0x3, 0x2, 0x2, 0x2, 0x274, 0x27b, 
       0x5, 0x8e, 0x48, 0x2, 0x275, 0x27b, 0x5, 0x8c, 0x47, 0x2, 0x276, 
       0x27b, 0x5, 0x92, 0x4a, 0x2, 0x277, 0x278, 0x7, 0x1a, 0x2, 0x2, 0x278, 
       0x27b, 0x5, 0x8a, 0x46, 0x2, 0x279, 0x27b, 0x5, 0x20, 0x11, 0x2, 
       0x27a, 0x26f, 0x3, 0x2, 0x2, 0x2, 0x27a, 0x270, 0x3, 0x2, 0x2, 0x2, 
       0x27a, 0x274, 0x3, 0x2, 0x2, 0x2, 0x27a, 0x275, 0x3, 0x2, 0x2, 0x2, 
       0x27a, 0x276, 0x3, 0x2, 0x2, 0x2, 0x27a, 0x277, 0x3, 0x2, 0x2, 0x2, 
       0x27a, 0x279, 0x3, 0x2, 0x2, 0x2, 0x27b, 0x8b, 0x3, 0x2, 0x2, 0x2, 
       0x27c, 0x281, 0x5, 0x18, 0xd, 0x2, 0x27d, 0x281, 0x5, 0x14, 0xb, 
       0x2, 0x27e, 0x281, 0x5, 0x22, 0x12, 0x2, 0x27f, 0x281, 0x7, 0x19, 
       0x2, 0x2, 0x280, 0x27c, 0x3, 0x2, 0x2, 0x2, 0x280, 0x27d, 0x3, 0x2, 
       0x2, 0x2, 0x280, 0x27e, 0x3, 0x2, 0x2, 0x2, 0x280, 0x27f, 0x3, 0x2, 
       0x2, 0x2, 0x281, 0x8d, 0x3, 0x2, 0x2, 0x2, 0x282, 0x283, 0x5, 0x6, 
       0x4, 0x2, 0x283, 0x284, 0x7, 0x39, 0x2, 0x2, 0x284, 0x285, 0x5, 0x90, 
       0x49, 0x2, 0x285, 0x286, 0x7, 0x3a, 0x2, 0x2, 0x286, 0x8f, 0x3, 0x2, 
       0x2, 0x2, 0x287, 0x28c, 0x5, 0x9a, 0x4e, 0x2, 0x288, 0x289, 0x7, 
       0x30, 0x2, 0x2, 0x289, 0x28b, 0x5, 0x9a, 0x4e, 0x2, 0x28a, 0x288, 
       0x3, 0x2, 0x2, 0x2, 0x28b, 0x28e, 0x3, 0x2, 0x2, 0x2, 0x28c, 0x28a, 
       0x3, 0x2, 0x2, 0x2, 0x28c, 0x28d, 0x3, 0x2, 0x2, 0x2, 0x28d, 0x91, 
       0x3, 0x2, 0x2, 0x2, 0x28e, 0x28c, 0x3, 0x2, 0x2, 0x2, 0x28f, 0x290, 
       0x7, 0x3b, 0x2, 0x2, 0x290, 0x291, 0x5, 0x94, 0x4b, 0x2, 0x291, 0x292, 
       0x7, 0x3d, 0x2, 0x2, 0x292, 0x298, 0x3, 0x2, 0x2, 0x2, 0x293, 0x294, 
       0x7, 0x3c, 0x2, 0x2, 0x294, 0x295, 0x5, 0x94, 0x4b, 0x2, 0x295, 0x296, 
       0x7, 0x3e, 0x2, 0x2, 0x296, 0x298, 0x3, 0x2, 0x2, 0x2, 0x297, 0x28f, 
       0x3, 0x2, 0x2, 0x2, 0x297, 0x293, 0x3, 0x2, 0x2, 0x2, 0x298, 0x93, 
       0x3, 0x2, 0x2, 0x2, 0x299, 0x29e, 0x5, 0x96, 0x4c, 0x2, 0x29a, 0x29b, 
       0x7, 0x30, 0x2, 0x2, 0x29b, 0x29d, 0x5, 0x96, 0x4c, 0x2, 0x29c, 0x29a, 
       0x3, 0x2, 0x2, 0x2, 0x29d, 0x2a0, 0x3, 0x2, 0x2, 0x2, 0x29e, 0x29c, 
       0x3, 0x2, 0x2, 0x2, 0x29e, 0x29f, 0x3, 0x2, 0x2, 0x2, 0x29f, 0x2a3, 
       0x3, 0x2, 0x2, 0x2, 0x2a0, 0x29e, 0x3, 0x2, 0x2, 0x2, 0x2a1, 0x2a3, 
       0x3, 0x2, 0x2, 0x2, 0x2a2, 0x299, 0x3, 0x2, 0x2, 0x2, 0x2a2, 0x2a1, 
       0x3, 0x2, 0x2, 0x2, 0x2a3, 0x95, 0x3, 0x2, 0x2, 0x2, 0x2a4, 0x2a7, 
       0x5, 0x7c, 0x3f, 0x2, 0x2a5, 0x2a6, 0x7, 0x42, 0x2, 0x2, 0x2a6, 0x2a8, 
       0x5, 0x7c, 0x3f, 0x2, 0x2a7, 0x2a5, 0x3, 0x2, 0x2, 0x2, 0x2a7, 0x2a8, 
       0x3, 0x2, 0x2, 0x2, 0x2a8, 0x97, 0x3, 0x2, 0x2, 0x2, 0x2a9, 0x2ae, 
       0x5, 0x6, 0x4, 0x2, 0x2aa, 0x2ab, 0x7, 0x39, 0x2, 0x2, 0x2ab, 0x2ac, 
       0x5, 0x90, 0x49, 0x2, 0x2ac, 0x2ad, 0x7, 0x3a, 0x2, 0x2, 0x2ad, 0x2af, 
       0x3, 0x2, 0x2, 0x2, 0x2ae, 0x2aa, 0x3, 0x2, 0x2, 0x2, 0x2ae, 0x2af, 
       0x3, 0x2, 0x2, 0x2, 0x2af, 0x99, 0x3, 0x2, 0x2, 0x2, 0x2b0, 0x2b4, 
       0x5, 0x7c, 0x3f, 0x2, 0x2b1, 0x2b3, 0x5, 0x9c, 0x4f, 0x2, 0x2b2, 
       0x2b1, 0x3, 0x2, 0x2, 0x2, 0x2b3, 0x2b6, 0x3, 0x2, 0x2, 0x2, 0x2b4, 
       0x2b2, 0x3, 0x2, 0x2, 0x2, 0x2b4, 0x2b5, 0x3, 0x2, 0x2, 0x2, 0x2b5, 
       0x9b, 0x3, 0x2, 0x2, 0x2, 0x2b6, 0x2b4, 0x3, 0x2, 0x2, 0x2, 0x2b7, 
       0x2b8, 0x7, 0x32, 0x2, 0x2, 0x2b8, 0x2b9, 0x5, 0x7c, 0x3f, 0x2, 0x2b9, 
       0x9d, 0x3, 0x2, 0x2, 0x2, 0x2ba, 0x2bb, 0x7, 0x13, 0x2, 0x2, 0x2bb, 
       0x2bc, 0x5, 0xe, 0x8, 0x2, 0x2bc, 0x9f, 0x3, 0x2, 0x2, 0x2, 0x2bd, 
       0x2be, 0x3, 0x2, 0x2, 0x2, 0x2be, 0xa1, 0x3, 0x2, 0x2, 0x2, 0x2bf, 
       0x2c0, 0x3, 0x2, 0x2, 0x2, 0x2c0, 0xa3, 0x3, 0x2, 0x2, 0x2, 0x2c1, 
       0x2c6, 0x5, 0xa6, 0x54, 0x2, 0x2c2, 0x2c6, 0x5, 0xaa, 0x56, 0x2, 
       0x2c3, 0x2c6, 0x5, 0xb2, 0x5a, 0x2, 0x2c4, 0x2c6, 0x5, 0xc0, 0x61, 
       0x2, 0x2c5, 0x2c1, 0x3, 0x2, 0x2, 0x2, 0x2c5, 0x2c2, 0x3, 0x2, 0x2, 
       0x2, 0x2c5, 0x2c3, 0x3, 0x2, 0x2, 0x2, 0x2c5, 0x2c4, 0x3, 0x2, 0x2, 
       0x2, 0x2c6, 0xa5, 0x3, 0x2, 0x2, 0x2, 0x2c7, 0x2c8, 0x7, 0x5, 0x2, 
       0x2, 0x2c8, 0x2c9, 0x5, 0xa8, 0x55, 0x2, 0x2c9, 0x2ca, 0x7, 0xf, 
       0x2, 0x2, 0x2ca, 0xa7, 0x3, 0x2, 0x2, 0x2, 0x2cb, 0x2d0, 0x5, 0x72, 
       0x3a, 0x2, 0x2cc, 0x2cd, 0x7, 0x31, 0x2, 0x2, 0x2cd, 0x2cf, 0x5, 
       0x72, 0x3a, 0x2, 0x2ce, 0x2cc, 0x3, 0x2, 0x2, 0x2, 0x2cf, 0x2d2, 
       0x3, 0x2, 0x2, 0x2, 0x2d0, 0x2ce, 0x3, 0x2, 0x2, 0x2, 0x2d0, 0x2d1, 
       0x3, 0x2, 0x2, 0x2, 0x2d1, 0xa9, 0x3, 0x2, 0x2, 0x2, 0x2d2, 0x2d0, 
       0x3, 0x2, 0x2, 0x2, 0x2d3, 0x2d6, 0x5, 0xac, 0x57, 0x2, 0x2d4, 0x2d6, 
       0x5, 0xae, 0x58, 0x2, 0x2d5, 0x2d3, 0x3, 0x2, 0x2, 0x2, 0x2d5, 0x2d4, 
       0x3, 0x2, 0x2, 0x2, 0x2d6, 0xab, 0x3, 0x2, 0x2, 0x2, 0x2d7, 0x2d8, 
       0x7, 0x14, 0x2, 0x2, 0x2d8, 0x2d9, 0x5, 0x7c, 0x3f, 0x2, 0x2d9, 0x2da, 
       0x7, 0x24, 0x2, 0x2, 0x2da, 0x2dd, 0x5, 0x72, 0x3a, 0x2, 0x2db, 0x2dc, 
       0x7, 0xe, 0x2, 0x2, 0x2dc, 0x2de, 0x5, 0x72, 0x3a, 0x2, 0x2dd, 0x2db, 
       0x3, 0x2, 0x2, 0x2, 0x2dd, 0x2de, 0x3, 0x2, 0x2, 0x2, 0x2de, 0xad, 
       0x3, 0x2, 0x2, 0x2, 0x2df, 0x2e0, 0x7, 0x7, 0x2, 0x2, 0x2e0, 0x2e1, 
       0x5, 0x7c, 0x3f, 0x2, 0x2e1, 0x2e2, 0x7, 0x1b, 0x2, 0x2, 0x2e2, 0x2e7, 
       0x5, 0xb0, 0x59, 0x2, 0x2e3, 0x2e4, 0x7, 0x31, 0x2, 0x2, 0x2e4, 0x2e6, 
       0x5, 0xb0, 0x59, 0x2, 0x2e5, 0x2e3, 0x3, 0x2, 0x2, 0x2, 0x2e6, 0x2e9, 
       0x3, 0x2, 0x2, 0x2, 0x2e7, 0x2e5, 0x3, 0x2, 0x2, 0x2, 0x2e7, 0x2e8, 
       0x3, 0x2, 0x2, 0x2, 0x2e8, 0x2ed, 0x3, 0x2, 0x2, 0x2, 0x2e9, 0x2e7, 
       0x3, 0x2, 0x2, 0x2, 0x2ea, 0x2eb, 0x7, 0x31, 0x2, 0x2, 0x2eb, 0x2ec, 
       0x7, 0xe, 0x2, 0x2, 0x2ec, 0x2ee, 0x5, 0xa8, 0x55, 0x2, 0x2ed, 0x2ea, 
       0x3, 0x2, 0x2, 0x2, 0x2ed, 0x2ee, 0x3, 0x2, 0x2, 0x2, 0x2ee, 0x2ef, 
       0x3, 0x2, 0x2, 0x2, 0x2ef, 0x2f0, 0x7, 0xf, 0x2, 0x2, 0x2f0, 0xaf, 
       0x3, 0x2, 0x2, 0x2, 0x2f1, 0x2f2, 0x5, 0x6c, 0x37, 0x2, 0x2f2, 0x2f3, 
       0x7, 0x32, 0x2, 0x2, 0x2f3, 0x2f4, 0x5, 0x72, 0x3a, 0x2, 0x2f4, 0xb1, 
       0x3, 0x2, 0x2, 0x2, 0x2f5, 0x2f9, 0x5, 0xb4, 0x5b, 0x2, 0x2f6, 0x2f9, 
       0x5, 0xb6, 0x5c, 0x2, 0x2f7, 0x2f9, 0x5, 0xb8, 0x5d, 0x2, 0x2f8, 
       0x2f5, 0x3, 0x2, 0x2, 0x2, 0x2f8, 0x2f6, 0x3, 0x2, 0x2, 0x2, 0x2f8, 
       0x2f7, 0x3, 0x2, 0x2, 0x2, 0x2f9, 0xb3, 0x3, 0x2, 0x2, 0x2, 0x2fa, 
       0x2fb, 0x7, 0x29, 0x2, 0x2, 0x2fb, 0x2fc, 0x5, 0x7c, 0x3f, 0x2, 0x2fc, 
       0x2fd, 0x7, 0xc, 0x2, 0x2, 0x2fd, 0x2fe, 0x5, 0x72, 0x3a, 0x2, 0x2fe, 
       0xb5, 0x3, 0x2, 0x2, 0x2, 0x2ff, 0x300, 0x7, 0x22, 0x2, 0x2, 0x300, 
       0x301, 0x5, 0xa8, 0x55, 0x2, 0x301, 0x302, 0x7, 0x27, 0x2, 0x2, 0x302, 
       0x303, 0x5, 0x7c, 0x3f, 0x2, 0x303, 0xb7, 0x3, 0x2, 0x2, 0x2, 0x304, 
       0x305, 0x7, 0x11, 0x2, 0x2, 0x305, 0x306, 0x5, 0x6, 0x4, 0x2, 0x306, 
       0x307, 0x7, 0x2f, 0x2, 0x2, 0x307, 0x308, 0x5, 0xba, 0x5e, 0x2, 0x308, 
       0x309, 0x7, 0xc, 0x2, 0x2, 0x309, 0x30a, 0x5, 0x72, 0x3a, 0x2, 0x30a, 
       0xb9, 0x3, 0x2, 0x2, 0x2, 0x30b, 0x30c, 0x5, 0xbc, 0x5f, 0x2, 0x30c, 
       0x30d, 0x9, 0x8, 0x2, 0x2, 0x30d, 0x30e, 0x5, 0xbe, 0x60, 0x2, 0x30e, 
       0xbb, 0x3, 0x2, 0x2, 0x2, 0x30f, 0x310, 0x5, 0x7c, 0x3f, 0x2, 0x310, 
       0xbd, 0x3, 0x2, 0x2, 0x2, 0x311, 0x312, 0x5, 0x7c, 0x3f, 0x2, 0x312, 
       0xbf, 0x3, 0x2, 0x2, 0x2, 0x313, 0x314, 0x7, 0x2a, 0x2, 0x2, 0x314, 
       0x315, 0x5, 0xc2, 0x62, 0x2, 0x315, 0x316, 0x7, 0xc, 0x2, 0x2, 0x316, 
       0x317, 0x5, 0x72, 0x3a, 0x2, 0x317, 0xc1, 0x3, 0x2, 0x2, 0x2, 0x318, 
       0x31d, 0x5, 0x7a, 0x3e, 0x2, 0x319, 0x31a, 0x7, 0x30, 0x2, 0x2, 0x31a, 
       0x31c, 0x5, 0x7a, 0x3e, 0x2, 0x31b, 0x319, 0x3, 0x2, 0x2, 0x2, 0x31c, 
       0x31f, 0x3, 0x2, 0x2, 0x2, 0x31d, 0x31b, 0x3, 0x2, 0x2, 0x2, 0x31d, 
       0x31e, 0x3, 0x2, 0x2, 0x2, 0x31e, 0xc3, 0x3, 0x2, 0x2, 0x2, 0x31f, 
       0x31d, 0x3, 0x2, 0x2, 0x2, 0x43, 0xc6, 0xd1, 0xd9, 0xe4, 0xe6, 0xf5, 
       0x102, 0x117, 0x11b, 0x12d, 0x134, 0x138, 0x13f, 0x144, 0x14a, 0x156, 
       0x15b, 0x161, 0x167, 0x179, 0x180, 0x189, 0x190, 0x193, 0x19a, 0x1a9, 
       0x1b1, 0x1c3, 0x1ce, 0x1dc, 0x1e1, 0x1ec, 0x1f8, 0x203, 0x20b, 0x211, 
       0x21f, 0x223, 0x229, 0x232, 0x23a, 0x245, 0x24d, 0x24f, 0x256, 0x25e, 
       0x266, 0x26b, 0x27a, 0x280, 0x28c, 0x297, 0x29e, 0x2a2, 0x2a7, 0x2ae, 
       0x2b4, 0x2c5, 0x2d0, 0x2d5, 0x2dd, 0x2e7, 0x2ed, 0x2f8, 0x31d, 
  };

  _serializedATN.insert(_serializedATN.end(), serializedATNSegment0,
    serializedATNSegment0 + sizeof(serializedATNSegment0) / sizeof(serializedATNSegment0[0]));


  atn::ATNDeserializer deserializer;
  _atn = deserializer.deserialize(_serializedATN);

  size_t count = _atn.getNumberOfDecisions();
  _decisionToDFA.reserve(count);
  for (size_t i = 0; i < count; i++) { 
    _decisionToDFA.emplace_back(_atn.getDecisionState(i), i);
  }
}

pascalParser::Initializer pascalParser::_init;
